Hi! I am doing stratified cox proportional hazard regression analyses. I used by statement with proc sort stated ahead.
My colleague told me to use strata statement. And I tried but I did not get stratum-specific results. Instead, I only got one HR (assuming there were 3 strata). I wondered how to do this with strata statement. Or, I should stick with the by statement with proc sort.
Thank you in advance!
Here's the code:
proc phreg data=mydata namelen=32;
class A(ref="1") B(ref="0") C(ref="aa");
model personyrs*Y(0)=X
A B C/rl;
strata D;
hazardratio X;
run;
Thank you very much! Others also suggested that WHERE statement would work. I wondered if there's any difference. Based on my understanding, I can get three stratum-specific estimates by running PHREG once. But for WHERE, I need to run it 3 times if I have 3 strata. Please correct me if I am wrong. I did not find any detail explanation about WHERE statement under PHREG in SAS help center.
Thank you!
Thank you very much! I also think BY would be the best fit but I was not sure about it. And, thanks for the explanation on the STRATA statement in PHREG.
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!
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.