in the MODEL statement are preceded by a forward slash. The code that follows
runs the same model as the preceding PROC LOGISTIC:
PROC GENMOD DATA¼REF.EVANS DESCENDING;
MODEL CHD ¼ CAT AGE CHL ECG SMK HPT CH CC/LINK¼LOGIT DIST¼BINOMIAL;
ESTIMATE‘OR (CHL¼220, HPT¼1)’CAT 1 CC 220 CH 1/EXP;
ESTIMATE‘OR (CHL¼220, HPT¼0)’CAT 1 CC 220 CH 0/EXP;
CONTRAST‘LRT for interaction terms’CH 1, CC 1;
RUN;
The DESCENDING option in the PROC GENMOD statement instructs SAS that the
outcome event of interest is CHD¼1 rather than the default, CHD¼0. An optional
ESTIMATE statement can be used to obtain point estimates, confidence intervals,
and a Wald test for a linear combination of parameters (e.g.,b 1 þ 1 b 6 þ 220 b 7 ). The
EXP option in the ESTIMATE statement exponentiates the requested linear combi-
nation of parameters. In this example, two odds ratios are requested using the
interaction parameters:
- exp(b 1 þ 1 b 6 þ 220 b 7 ) is the odds ratio for CAT¼1 vs. CAT¼0 for HPT¼1 and
CHOL¼ 220 - exp(b 1 þ 0 b 6 þ 220 b 7 ) is the odds ratio for CAT¼1 vs. CAT¼0 for HPT¼0 and
CHOL¼ 220
The quoted text following the word ESTIMATE is a “label” that is printed in the
output. The user is free to define his/her own label. The CONTRAST statement, as
used in this example, requests a likelihood ratio test on the two interaction terms (CH
and CC). The CONTRAST statement also requires that the user define a label. The
same CONTRAST statement in PROC LOGISTIC would produce a generalized Wald
test statistic, rather than a likelihood ratio test, for the two interaction terms.
The output produced from PROC GENMOD follows:
The GENMOD Procedure
Model Information
Data Set WORK.EVANS1
Distribution Binomial
Link Function Logit
Dependent Variable chd
Observations Used 609
Response Profile
Ordered
Value chd
Total
Frequency
1171
2 0 538
PROC GENMOD is modeling the probability that chd¼‘ 1 ’.
606 Appendix: Computer Programs for Logistic Regression