BookmarkSubscribeRSS Feed
Lulu09
Calcite | Level 5

There are 3 groups. And I want to get the hazard ratio for group 1 vs group 3, and group 2 vs group 3. The results that are generated from below 2 methods are not the same. So should I better put all 3 groups into PHREG, and set group 3 as reference level, Or should I select 2 groups each time when I execute PHREG procedure ? Thank you very much.

 

Method 1

proc phreg data = xx alpha=0.05;
    class trt (ref="3");
    model aval*cnsr(1)=trt /ties=exact;
    hazardratio trt / diff=all;
run;

Method 2

proc phreg data = xx(where=(trt in (1,3) )) alpha=0.05;
    class trt (ref="3");
    model aval*cnsr(1)=trt /ties=exact;
    hazardratio trt ;
run;

proc phreg data = xx(where=(trt in (2,3) )) alpha=0.05;
    class trt (ref="3");
    model aval*cnsr(1)=trt /ties=exact;
    hazardratio trt ;
run;

1 REPLY 1
OsoGris
SAS Employee

I think it is advisable to keep all three treatments in one model. If you want the differences with the reference category you can use the option DIFF=REF on the HAZARDRATIO statement. 

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
  • 1 reply
  • 1313 views
  • 0 likes
  • 2 in conversation