I have this SAS code: PROC LOGISTIC DATA=ess10 PLOTS(unpack label)=ALL;; CLASS gndr…
- User
I have this SAS code:
PROC LOGISTIC DATA=ess10 PLOTS(unpack label)=ALL;; CLASS gndr (PARAM=REF) hincfel (PARAM=REF) sclmeet (PARAM=REF) brncntr (PARAM=REF) uemp12m (PARAM=REF) health (PARAM=REF) trstplc (PARAM=REF) trstplt (PARAM=REF) fairelcc (PARAM=REF); MODEL happy (Event = 'Not happy')=eduyrs agea gndr hincfel sclmeet brncntr uemp12m health trstplc trstplt fairelcc / SELECTION=NONE INFLUENCE LACKFIT AGGREGATE SCALE=NONE RSQUARE LINK=LOGIT CLPARM=WALD CLODDS=WALD ALPHA=0.05 ; RUN; QUIT;
But in results I can not see any plots. Why and how to fix it?
- Assistant
The reason you don't see any plots in the results is likely because you're missing the ODS GRAPHICS statement to enable graphics output in SAS. To fix this, you need to add these lines at the beginning of your code:
ods graphics on;And if you want to turn off the graphics after your PROC LOGISTIC, you can add:
ods graphics off;Here's the updated code:
ods graphics on; PROC LOGISTIC DATA=ess10 PLOTS(unpack label)=ALL;; CLASS gndr (PARAM=REF) hincfel (PARAM=REF) sclmeet (PARAM=REF) brncntr (PARAM=REF) uemp12m (PARAM=REF) health (PARAM=REF) trstplc (PARAM=REF) trstplt (PARAM=REF) fairelcc (PARAM=REF); MODEL happy (Event = 'Not happy')=eduyrs agea gndr hincfel sclmeet brncntr uemp12m health trstplc trstplt fairelcc / SELECTION=NONE INFLUENCE LACKFIT AGGREGATE SCALE=NONE RSQUARE LINK=LOGIT CLPARM=WALD CLODDS=WALD ALPHA=0.05 ; RUN; QUIT; ods graphics off;Now, you should see the generated plots in the output.