/******************************************** ODS Plots to edit ods plots sgedit on dataset used: afifi.sas7bdat filename: ods_graphics.sas *********************************************/ libname mylib "."; data afifi; set mylib.afifi; if survive=1 then died=0; if survive=3 then died=1; if shoktype=2 then shock=0; if shoktype >2 then shock=1; run; ods graphics on; proc ttest data=mylib.afifi; class survive; var sbp1; run; ods graphics off; ods graphics on; title "Regression with Default Plots"; proc reg data=mylib.afifi; model sbp2 = sbp1 sex age/partial; run; quit; ods graphics off; ods graphics on; title "Regression with Unpacked Plots"; proc reg data=mylib.afifi plots(only)=DiagnosticsPanel(unpack); model sbp2 = sbp1 sex age; run; quit; ods graphics off; /******************************************** Some options for proc reg plots plots = none plots = diagnostics(unpack) plots = (all fit(stats)=none) plots(label) = (rstudentbyleverage cooksd) plots(only) = (diagnostics(stats=all) fit(nocli stats=(aic sbc))) ************************************************/ ods graphics on; title "Regression with Plots"; proc reg data=mylib.afifi plots(label)=(rstudentbyleverage cooksd); model sbp2 = sbp1 sex age; run; quit; ods graphics off; ods graphics on; title "Regression with Plots"; proc reg data=mylib.afifi plots(only label)=(rstudentybyleverage cooksd); model sbp2 = sbp1 sex age/partial; run; quit; ods graphics off; /******************************************** ANOVA Plots *********************************************/ ods graphics on; title "Anova with Plots"; proc glm data=mylib.afifi; class shoktype ; model sbp1 = shoktype; lsmeans shoktype / pdiff adjust=tukey; run; quit; ods graphics off; /******************************************** Logistic Regression Plots *********************************************/ ods graphics on; title "Logistic Regression with Plots"; proc logistic data = mylib.afifi descending plots(only)=(effect roccurve) ; class shoktype; model survive = sbp1 shoktype; output out=preddat p=predict reschi=rchi resdev=rdev h=leverage; run; quit; ods graphics off;