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;
I figured it out, by using
hazardratio 'Group comparisons ' ARM / diff=all;
I figured it out, by using
hazardratio 'Group comparisons ' ARM / diff=all;
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.
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.
The hazard ratio will be correct, the parameter estimate may not be what you expect however.
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.