/******************************************** ODS Plots to edit ods plots sgedit on datasets used: afifi.sas7bdat skelleftea.sas7bdat filename: ods_graphics.sas *********************************************/ libname mylib "C:\"; 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=(all) ; class shoktype; model survive = sbp1 shoktype ; run; quit; ods graphics off; title "Logistic Regression Save Output Dataset"; proc logistic data = mylib.afifi descending; class shoktype; model survive = sbp1 shoktype ; output out=preddat p=predict reschi=rchi resdev=rdev h=leverage; run; quit; proc print data=preddat(obs=10); run; /********************************************* Quantreg Plots **********************************************/ ods graphics on ; title "Quantreg Plots"; proc quantreg data=mylib.skelleftea; model avg_sum_mantal =taxyr_min / quantile=.05 .25 .50 .75 .95 plot=quantplot; run; ods graphics off;