BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Plessein
Fluorite | Level 6

Hi, everyone

 

I am making ODDs ratio graph by using SGPLOT. I am a user of SAS university.

 

Proc sgplot data=Figure4OR noautolegend;

   scatter y=Effect x=OddsratioEST / xerrorlower=LowerCL xerrorupper=UpperCL

           markerattrs=(symbol=circlefilled);

   refline 0 / axis=x;

   xaxis grid;

   yaxis grid display=(nolabel) discreteorder=data reverse;

  

Run;

 

 

I got a graph as the attached file.

 

 I would like to change the values in Y axis. (ex. RF_HF_Known 1 vs 0 -> Heart Failure)

 

I could not find the method.

 

Could you help me?

 

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Create a format and apply the format to the variable, ideally in the PROC LOGISTIC or whatever procedure you're using to generate the ODDSRATIO.

 

http://www2.sas.com/proceedings/sugi30/001-30.pdf

 

proc format;
value sample_format
1 = 'Heart Attack'
2 = 'No Heart Attack';
run;

View solution in original post

2 REPLIES 2
Reeza
Super User

Create a format and apply the format to the variable, ideally in the PROC LOGISTIC or whatever procedure you're using to generate the ODDSRATIO.

 

http://www2.sas.com/proceedings/sugi30/001-30.pdf

 

proc format;
value sample_format
1 = 'Heart Attack'
2 = 'No Heart Attack';
run;

Plessein
Fluorite | Level 6

I appreciate your promp answer & good solution.

 

I used the logistic procedure and ODS output. I could find that there was "Effect" variable and the Text that I would like to change were contents of the variable "Effect".

 

By changing the contents and using format, I could make what I wanted.

 

Thank you again!

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
  • 2 replies
  • 1519 views
  • 0 likes
  • 2 in conversation