Snoring v. Heart Disease Study
The following SAS program does the data analysis for the study of snoring as a possible risk factor for heart disease. There were n = 2484 subjects in the study. Snoring level was reported by spouses. The first use of PROC GENMOD does ordinary linear regression, with Snoring as the predictor variable, and proportion of positive diagnoses for Heart Disease as the response variable. The second use of PROC GENMOD uses logistic regression, with the logit link function. In addition, PROC LOGISTIC is included as an alternative to PROC GENMOD for fitting logit models.
For each observation, the input values are: i) Level of snoring at night; ii) count of number of patients with heart disease, iii) count of all patients at that level of snoring.
For the first model, the fitted equation is:
Prop=0.0172+0.0198Snore.
For the logistic regression model, the fitted equation is:
logitProp=-3.8662+0.3973Snore.
For the probit model, the fitted equation is:
probitProp=-2.0606+0.1878Snore.
Proc format;
value snrfmt 0 = "Never "
2 = "Occasional "
4 = "Nearly every night"
5 = "Every night ";
data snore;
input snore CHD Total @@;
label snore = "Snore during sleep?"
CHD = "Heart Disease?";
format snore snrfmt.;
datalines;
0 24 1379 2 35 638 4 21 213 5 30 254
proc print;
proc genmod;
model CHD/Total = snore / dist=bin link=identity;
title "Linear Regression of CHD Proportion v. Snoring";
;
proc genmod;
model CHD/Total = snore / dist=bin link=logit lrci;
title "Logistic Regression of CHD Proportion v. Snoring";
;proc genmod;
model CHD/Total = / dist=bin link=logit;
title "Logist Regression of CHD Proportion, Intecept Model";
;
proc logistic;
model CHD/Total = snore;
;
proc genmod;
model CHD/Total = snore / dist=bin link=probit;
title "Probit Model for CHD Proportion v. Snoring";
;
run;
The SAS System
Obs snore CHD Total
1 Never 24 1379
2 Occasional 35 638
3 Nearly every night 21 213
4 Every night 30 254
Linear Regression of CHD Proportion v. Snoring 1
The GENMOD Procedure
Model Information
Data Set WORK.SNORE
Distribution Binomial
Link Function Identity
Response Variable (Events) CHD Heart Disease?
Response Variable (Trials) Total
Number of Observations Read 4
Number of Observations Used 4
Number of Events 110
Number of Trials 2484
Response Profile
Ordered Binary Total
Value Outcome Frequency
1 Event 110
2 Nonevent 2374
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 2 0.0692 0.0346
Scaled Deviance 2 0.0692 0.0346
Pearson Chi-Square 2 0.0688 0.0344
Scaled Pearson X2 2 0.0688 0.0344
Log Likelihood -417.4960
Full Log Likelihood -10.1609
AIC (smaller is better) 24.3217
AICC (smaller is better) 36.3217
BIC (smaller is better) 23.0943
Algorithm converged.
Analysis Of Maximum Likelihood Parameter Estimates
Standard Wald 95% Confidence Wald
Parameter DF Estimate Error Limits Chi-Square Pr > ChiSq
Intercept 1 0.0172 0.0034 0.0105 0.0240 25.18 <.0001
snore 1 0.0198 0.0028 0.0143 0.0253 49.97 <.0001
Scale 0 1.0000 0.0000 1.0000 1.0000
NOTE: The scale parameter was held fixed.
Logistic Regression of CHD Proportion v. Snoring
The GENMOD Procedure
Model Information
Data Set WORK.SNORE
Distribution Binomial
Link Function Logit
Response Variable (Events) CHD Heart Disease?
Response Variable (Trials) Total
Number of Observations Read 4
Number of Observations Used 4
Number of Events 110
Number of Trials 2484
Response Profile
Ordered Binary Total
Value Outcome Frequency
1 Event 110
2 Nonevent 2374
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 2 2.8089 1.4045
Scaled Deviance 2 2.8089 1.4045
Pearson Chi-Square 2 2.8743 1.4372
Scaled Pearson X2 2 2.8743 1.4372
Log Likelihood -418.8658
Full Log Likelihood -11.5307
AIC (smaller is better) 27.0615
AICC (smaller is better) 39.0615
BIC (smaller is better) 25.8341
Algorithm converged.
Analysis Of Maximum Likelihood Parameter Estimates
Standard Likelihood Ratio 95% Wald
Parameter DF Estimate Error Confidence Limits Chi-Square Pr > ChiSq
Intercept 1 -3.8662 0.1662 -4.2072 -3.5544 541.06 <.0001
snore 1 0.3973 0.0500 0.2999 0.4964 63.12 <.0001
Scale 0 1.0000 0.0000 1.0000 1.0000
NOTE: The scale parameter was held fixed.
Logistic Regression of CHD Proportion v. Snoring
The GENMOD Procedure
NOTE: The scale parameter was held fixed.
Logistic Regression of CHD Proportion, Intecept Model
The GENMOD Procedure
Model Information
Data Set WORK.SNORE
Distribution Binomial
Link Function Logit
Response Variable (Events) CHD Heart Disease?
Response Variable (Trials) Total
Number of Observations Read 4
Number of Observations Used 4
Number of Events 110
Number of Trials 2484
Response Profile
Ordered Binary Total
Value Outcome Frequency
1 Event 110
2 Nonevent 2374
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 3 65.9045 21.9682
Scaled Deviance 3 65.9045 21.9682
Pearson Chi-Square 3 72.7820 24.2607
Scaled Pearson X2 3 72.7820 24.2607
Log Likelihood -450.4136
Full Log Likelihood -43.0785
AIC (smaller is better) 88.1570
AICC (smaller is better) 90.1570
BIC (smaller is better) 87.5433
Algorithm converged.
Analysis Of Maximum Likelihood Parameter Estimates
Standard Wald 95% Confidence Wald
Parameter DF Estimate Error Limits Chi-Square Pr > ChiSq
Intercept 1 -3.0719 0.0975 -3.2630 -2.8807 992.02 <.0001
Scale 0 1.0000 0.0000 1.0000 1.0000
NOTE: The scale parameter was held fixed.
Logistic Regression of CHD Proportion v. Snoring 5
The LOGISTIC Procedure
Model Information
Data Set WORK.SNORE
Response Variable (Events) CHD Heart Disease?
Response Variable (Trials) Total
Model binary logit
Optimization Technique Fisher's scoring
Number of Observations Read 4
Number of Observations Used 4
Sum of Frequencies Read 2484
Sum of Frequencies Used 2484
Response Profile
Ordered Binary Total
Value Outcome Frequency
1 Event 110
2 Nonevent 2374
Model Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Model Fit Statistics
Intercept
Intercept and
Criterion Only Covariates
AIC 902.827 841.732
SC 908.645 853.367
-2 Log L 900.827 837.732
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 63.0956 1 <.0001
Score 72.6881 1 <.0001
Wald 63.1238 1 <.0001
Logistic Regression of CHD Proportion v. Snoring 6
The LOGISTIC Procedure
Analysis of Maximum Likelihood Estimates
Standard Wald
Parameter DF Estimate Error Chi-Square Pr > ChiSq
Intercept 1 -3.8662 0.1662 541.0562 <.0001
snore 1 0.3973 0.0500 63.1238 <.0001
Odds Ratio Estimates
Point 95% Wald
Effect Estimate Confidence Limits
snore 1.488 1.349 1.641
Association of Predicted Probabilities and Observed Responses
Percent Concordant 58.6 Somers' D 0.419
Percent Discordant 16.7 Gamma 0.556
Percent Tied 24.7 Tau-a 0.035
Pairs 261140 c 0.709
Probit Model for CHD Proportion v. Snoring 7
The GENMOD Procedure
Model Information
Data Set WORK.SNORE
Distribution Binomial
Link Function Probit
Response Variable (Events) CHD Heart Disease?
Response Variable (Trials) Total
Number of Observations Read 4
Number of Observations Used 4
Number of Events 110
Number of Trials 2484
Response Profile
Ordered Binary Total
Value Outcome Frequency
1 Event 110
2 Nonevent 2374
Criteria For Assessing Goodness Of Fit
Criterion DF Value Value/DF
Deviance 2 1.8716 0.9358
Scaled Deviance 2 1.8716 0.9358
Pearson Chi-Square 2 1.9101 0.9550
Scaled Pearson X2 2 1.9101 0.9550
Log Likelihood -418.3971
Full Log Likelihood -11.0621
AIC (smaller is better) 26.1241
AICC (smaller is better) 38.1241
BIC (smaller is better) 24.8967
Algorithm converged.
Analysis Of Maximum Likelihood Parameter Estimates
Standard Wald 95% Confidence Wald
Parameter DF Estimate Error Limits Chi-Square Pr > ChiSq
Intercept 1 -2.0606 0.0704 -2.1986 -1.9225 855.49 <.0001
snore 1 0.1878 0.0236 0.1415 0.2341 63.14 <.0001
Scale 0 1.0000 0.0000 1.0000 1.0000
NOTE: The scale parameter was held fixed.