BookmarkSubscribeRSS Feed
Madame_O
Fluorite | Level 6

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;

3 REPLIES 3
ballardw
Super User

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.

Ksharp
Super User

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;

Ksharp_0-1706841807447.png

 

Madame_O
Fluorite | Level 6
Thank you for the suggestions, I will try this.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 754 views
  • 3 likes
  • 3 in conversation