BookmarkSubscribeRSS Feed
dougd
Calcite | Level 5

The following code produces the effectplot attached. As you can see, the x-axis (ADI) goes 1 2 3 0. Is there any way to order the x-axis to be 0 1 2 3?

Thanks so much!

Doug.

  

Proc GLIMMIX Data=analysis;

   Effect splrf=spline(rf / degree=2 knotmethod=equal(1));

   Class PSagegp(ref='40');

   Class ADI(ref='0');

   Model SRH = ADI splrf PSagegp sexn / solution;

   Weight weight;

   Store splrfADI;

run;

Proc PLM restore=splrfADI;

   EffectPlot interaction(x=ADI plotby=PSagegp) / at(sexn=0 rf=0) CLM;

run;


InteractionPanel1.png
3 REPLIES 3
edwardbrown
Calcite | Level 5

I'm also searching for an answer to this question. I've not been able to find anything in the documentation. Hopefully someone from SAS or an expert can give advice-or perhaps this is a functionality for a future release.

 

Rick_SAS
SAS Super FREQ

The ADI=0 and PSAge=40 groups are presented last because they are explicitly set as the reference levels.

If you want the plots in alphanumeric order by levels, use the default ordering of the CLASS variable, or explicitly set 

 

Class PSagegp(ref=LAST);
Class ADI(ref=LAST);

 

Although the ParameterEstimates table will change, the predicted values are the same no matter what level you use as the reference level.

 

edwardbrown
Calcite | Level 5

Perfect, thank you. Using (ref=LAST) works for me.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2299 views
  • 1 like
  • 3 in conversation