BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
fastandcurious
Obsidian | Level 7

Hello!

I wanted to display my Odds Ratio estimates/ Wale Confidence Limits in descending order.  Currently my plots look scattered like this with the following code:

proc logistic data=libraryname.test plots=(oddsratio) ;
class race (ref="1") /param=ref;
model outcomevar (event="Yes") =race;
run;

fastandcurious_0-1690563626395.png

 

I want the plots to display in order like this:

 

fastandcurious_1-1690563827146.png

I am not sure if it's possible but if it is,  what statement I should use and where? I thought there would be something for the model or plot statements but nothing I've tried has worked.

 

1 ACCEPTED SOLUTION

Accepted Solutions
fastandcurious
Obsidian | Level 7

Thank you! I will have to keep this in mind as an option. I ended up using the following solution and it worked for what I needed 🙂

Thank you for helping out 🙂

proc logistic data=libraryname.test plots=ODDSRATIO(ORDER=DESCENDING) ;

fastandcurious_0-1690570050719.png

 

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

Apply a format to your RACE levels so that they are in the desired order when sorted. 

fastandcurious
Obsidian | Level 7

Thank you! I will have to keep this in mind as an option. I ended up using the following solution and it worked for what I needed 🙂

Thank you for helping out 🙂

proc logistic data=libraryname.test plots=ODDSRATIO(ORDER=DESCENDING) ;

fastandcurious_0-1690570050719.png

 

mkeintz
PROC Star

@fastandcurious 

 

Mark your solution as the solution, so that curious users can see it marked as solved.

 

Editted note:  I think you just eliminated half the value of my comment.  Yes, your topic is marked as solved, but I expected you to indicate it was your own reported use of  ODDSRATIO(ORDER=DESCENDING)  as the solution, rather than this comment.

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
fastandcurious
Obsidian | Level 7

Sorry about that, I was having technical issues because I opened this up through my phone. Should be fixed now 🙂

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 778 views
  • 3 likes
  • 3 in conversation