Hi all, I am using SAS studio. This is what my code looks like, but the y-axis looks shrunk for the first graph. I tried running the code again, using one effect plot...statement and it was still the same. I tried double-clicking on the graph, and right-click but no pop-up window.
ods graphics on;
proc logistic data=multi descending;
class damage(ref=first) smell(ref=first) smokeinlive(ref=first) employ(ref=first) pain(ref=first) clinicalinsomnia(ref=first) sleepquality1(ref=first) everasthma(ref=first) evercb(ref=first) evercopd(ref=first) depression(ref=first) everptsd(ref=first)/param=reference;
model everanxiety=damage smell smokeinlive employ clinicalinsomnia sleepquality1 pain everasthma evercb evercopd depression everptsd employ*sleepquality1 smokeinlive*sleepquality1;
effectplot interaction (x=employ sliceby=sleepquality1)/clm connect;
effectplot interaction (x=smokeinlive sliceby=sleepquality1)/clm connect;
run;
ods graphics off;
Most of the graphs produced by analysis procedures like Proc Logistic are to help you see the results and typically are not publication ready.
If you really want to make a graph look a specific way I suggest that you export the appropriate data from the analysis procedure and use Proc Sgplot or Sgpanel as appropriate to make the graph(s).
Without data or even a picture of the result it is hard to make any specific suggestions.
Here is an example:
ods output InteractionPlot=InteractionPlot;
proc logistic data=sashelp.heart(obs=1000) descending;
class bp_status sex;
model status=height bp_status sex bp_status*sex;
effectplot interaction (x=sex sliceby=bp_status)/clm connect;
run;
ods graphics /width=800px height=600px;
proc sgplot data=InteractionPlot;
series x=_XCLAS y=_PREDICTED/ group=_GROUP;
scatter x=_XCLAS y=_PREDICTED/yerrorlower=_UCLM yerrorupper=_LCLM group=_GROUP;
yaxis label='Whatever you want' values=(0 to 1 by 0.1) grid ;
xaxis offsetmin=0.1 offsetmax=0.1 ;
run;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.