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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1562 views
  • 1 like
  • 3 in conversation