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

I have 4 treatment arms, and arm 1 is the active treatment group, and arms 2, 3 and 4 are three control groups. 

How to get Hazard Ratios and 95% CIs of Arm1 vs Arm2, Arm1 vs Arm3, and Arm1 vs Arm4?

 

using the code below (Ref='1') I can get HR of Arm2 vs Arm1, Arm3 vs Arm1 and Arm4 vs Arm1, and the 95% CIs.

To convert to HR of Arm1 vs the others, I can take Reciprocal of the original HRs, but how to get the 95% CI of the Reciprocal? 

ods listing close;
ods output  ParameterEstimates  =__str_ParameterEstimates0 
            GlobalTests         =__str_GlobalTests0;
proc phreg data=endpoint;
    class ARM (ref='1');
    strata Agegrn ;
    model aval * cnsr(1) = ARM / risklimits;
quit;
ods output close;
ods listing;
1 ACCEPTED SOLUTION

Accepted Solutions
fengyuwuzu
Pyrite | Level 9

I figured it out, by using 

hazardratio 'Group comparisons ' ARM / diff=all;

View solution in original post

5 REPLIES 5
fengyuwuzu
Pyrite | Level 9

I figured it out, by using 

hazardratio 'Group comparisons ' ARM / diff=all;
Reeza
Super User

You may also want to set PARAM=REF on your CLASS statement. 

Review the design matrix (top of the SAS output) to ensure it's what you're expected. Otherwise you'll likely interpret your parameters incorrectly, and/or your next question will be why are the ratios from the parameter estimates different than the ones from HazardRatio statement. 

fengyuwuzu
Pyrite | Level 9

Thank you Reeza. 

I have compared the output using Hazardratio statement and the one I got before, so I know I got the right numbers. 

I will also look at the PARAM=REF option. Thanks.

Reeza
Super User

The hazard ratio will be correct, the parameter estimate may not be what you expect however.

fengyuwuzu
Pyrite | Level 9

Oh, I did not realize that. So, is the code below right? Do I need to use the contrast statement ?

 

ods listing close;
ods output  ParameterEstimates  =__str_ParameterEstimates0 
            GlobalTests         =__str_GlobalTests0;
proc phreg data=endpoint;
    class ARM (ref='1')  / param=ref;
    strata Agegrn ;
    model aval * cnsr(1) = ARM / risklimits;
quit;
ods output close;
ods listing;

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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