** Models Pr(Died) by default; PROC GENMOD DATA=donner; CLASS Status Sex; MODEL Status = Age|Sex / DIST=BINOMIAL; ESTIMATE 'Female 20' Intercept 1 Sex 1 Age 20 Sex*Age 20; RUN; ** Model Pr(Survived); PROC GENMOD DATA=donner DESCENDING; CLASS Status Sex; MODEL Status = Age|Sex / DIST=BINOMIAL; ESTIMATE 'Female 20' Intercept 1 Sex 1 Age 20 Sex*Age 20; RUN; ** Change reference category to female; PROC GENMOD DATA=donner DESCENDING; CLASS Status Sex(REF='Female' PARAM=REF); MODEL Status = Age|Sex / DIST=BINOMIAL; ESTIMATE 'Female 20' Intercept 1 Age 20; RUN; /* Using PROC LOGISTIC NOTE: By default, PROC LOGISTIC uses 'effect cell coding'. This is VERY important to be aware of, as this is NOT the default in most other SAS regression procedures. Note that these estimates are different from those we got from GENMOD. */ PROC LOGISTIC DATA=donner DESCENDING; CLASS Status Sex; MODEL Status = Age|Sex; RUN; /* Using reference cell coding Note that our answers now agree with PROC GENMOD (and R) */ PROC LOGISTIC DATA=donner DESCENDING; CLASS Status Sex(PARAM=REF); MODEL Status = Age|Sex; RUN; /* ESTIMATE and CONTRAST statements can be used, but have slightly different syntax The two statements below accomplish the same thing as each other, as well as provide the same results as in PROC GENMOD */ PROC LOGISTIC DATA=donner DESCENDING; CLASS Status Sex(PARAM=REF); MODEL Status = Age|Sex; CONTRAST 'Female 20' Intercept 1 Sex 1 Age 20 Sex*Age 20 / ESTIMATE=PROB; ESTIMATE 'Female 20' Intercept 1 Sex 1 Age 20 Sex*Age 20 / ILINK CL; RUN;