BookmarkSubscribeRSS Feed
Gen
Calcite | Level 5 Gen
Calcite | Level 5

Hi,

I obtained relative risk (RR) using PROC PHREG for a continuous predictor.  By default, the RR was calculated for a unit INCREASE of the predictor, However, what I want to obtain is the ratio per a unit DECREASE. In other words, SAS calculates  "(risk in a higher level) / (risk in a lower level)" but I want to make SAS to calculated "(risk in a lower level) / (risk in a higher level)." If you know how to obtain relative risk or odds ratio per a unit decrease of a continuous predictor with a command other than PROC PHREG (i.e., PROC REG, PROC LOGISTICS, etc...), please share your knowledge.

Following are the codes that I used.

proc phreg data=please;

  model time*event(0)=continuous_predictor;

run;

Thanks!

4 REPLIES 4
Reeza
Super User

Try HazardRatio statement with unit = -1.

Gen
Calcite | Level 5 Gen
Calcite | Level 5

Thank you for your comment, Reeza. Would you specify what you mentioned above? 

Reeza
Super User

Hmm...I thought the following would work, but I guess not since unit only accepts positive values. 

Not sure Smiley Sad

proc phreg data=please;

  model time*event(0)=continuous_predictor;

hazardratio continuous_predictor/unit=-1;

run;

StatDave
SAS Super FREQ

PROC LOGISTIC will also report the odds ratio for a unit increase in the continuous predictor.  To get the reciprocal of that odds ratio, you would have to model the other level of the binary response.  For example, if your response levels are coded 0 and 1 and you model the probability of 0:

model y(event="0")=x;

then modeling the probability of 1 will give an odds ratio that is the reciprocal of the above:

model y(event="1")=x;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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