/* If you want any help making the plots and carrying out the analyses in the case study, let me know. It's just too much work to redo the entire thing in SAS. However, it is useful to know about the effect plots that SAS provides in PROC LOGISITC. */ PROC LOGISTIC DATA=Wells; MODEL Switch(EVENT='1') = Dist Arsenic Educ; EFFECTPLOT Fit(X=Dist); EFFECTPLOT Fit(X=Arsenic); EFFECTPLOT Fit(X=Educ); RUN; DATA Wells; Set Wells; IF (Educ eq 0) THEN EduCat = "None"; IF (Educ > 0 & Educ < 6) THEN EduCat = "1-5"; IF (Educ > 5 & Educ < 11) THEN EduCat = "6-10"; IF (Educ > 10) THEN EduCat = "11+"; RUN; PROC LOGISTIC DATA=Wells; CLASS EduCat; MODEL Switch(EVENT='1') = Dist|EduCat Arsenic; EFFECTPLOT Fit(X=Dist PLOTBY=EduCat); EFFECTPLOT Fit(X=Arsenic); RUN; /* For illustration's sake only, here is EFFECTPLOT used with a continuous variable */ PROC LOGISTIC DATA=Wells; CLASS EduCat; MODEL Switch(EVENT='1') = Dist|Arsenic EduCat; EFFECTPLOT Fit(X=Dist PLOTBY=Arsenic); EFFECTPLOT Fit(X=Arsenic PLOTBY=Dist=0 100 200 300); RUN;