Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 1140 views
  • 3 likes
  • 3 in conversation