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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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