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

I'm using the competing risk model with PHREG on SAS 9.4 and want to obtain the 95% confidence interval for the hazard ratio of a specific variable. In the CLASS statement I specify the reference level I want, but then when I use the HAZARDRATIO  statement to get the 95% CI, it uses the wrong reference level.  How do I make the HAZARDRATIO  statement use the same reference level as the CLASS statement?

 

proc phreg data=hcc_nonsbrt;
class protons (ref="No");
model fu_time_local_failure*local_failure_cr(0)=protons / eventcode=1;
hazardratio protons ;
format protons binaryf.;
run;

hazard ratio reference level.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
SAS_Rob
SAS Employee

Try the DIFF=REF option.

 

hazardratio protons/diff=ref;

 

Reeza
Super User
You likely also want PARAM =REF in your class statement as well, otherwise it uses GLM coding.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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