******************************************************************/ options ls=80 ps=59 nodate; run; /****************************************************************** The data look like (first 10 records) 1 1 33 1 0 2 0 32 0 0 3 1 37 0 1 4 0 36 0 0 5 1 50 1 1 6 1 40 0 0 7 0 35 0 0 8 1 33 0 0 9 1 33 0 0 10 0 31 0 0 . . . column 1 subject id column 2 oral contraceptive indicator (0=no,1=yes) column 3 age (years) column 4 smoking indicator (0=no,1=yes) column 5 binary response -- whether MI has been suffered (0=no,1=yes) ******************************************************************/ data mi; infile 'infarc.dat'; input id oral age smoke mi; run; /***************************************************************** Fit the logistic regression model using PROC GENMOD. We do not use a CLASS statement here, as the covariates are either continuous (AGE) or already in "dummy" form (ORAL, SMOKE). The model statement with the LINK=LOGIT option results in the logistic regression model in equation (10.21). The DIST=BINOMIAL specifies the Bernoulli distribution, which is the simplest case of a binomial distribution. ******************************************************************/ proc genmod data=mi; model mi = oral age smoke / dist = binomial link = logit; run;