Hello,
I am trying to apply a survival analysis and checking if "age" is a confounder in the model. My code is the following-
proc phreg data=have;
class group (ref='1') age / param = ref;
model year*outcome(0)= group age /rl;
run;
However, I am getting this result:
I am not sure why I am getting all the separate rows for age. It's a continuous variable but I want to get a specific hazard ratio and compare it with the group's hazard ratio. Can anyone please tell me what should I do?
Thanks!
Hello. The reason why SAS gave such a result is that you put the parameter age in your CLASS statement. By doing so, SAS deems age as a discrete variable, with each and every value of age being a category. You can delete "age" and try again.
As for the comparison you mentioned, I am not quite sure about the comparison you wish to make. Did you want to compare the HR of age increases by 1 over the HR of group 2 and group 1? If so, since you have entered "rl" at the end of the MODEL statement, you can compare the confidence intervals of the two variables to see if there is a statistical difference by checking if there is an overlap of the two confidence intervals.
Hello. The reason why SAS gave such a result is that you put the parameter age in your CLASS statement. By doing so, SAS deems age as a discrete variable, with each and every value of age being a category. You can delete "age" and try again.
As for the comparison you mentioned, I am not quite sure about the comparison you wish to make. Did you want to compare the HR of age increases by 1 over the HR of group 2 and group 1? If so, since you have entered "rl" at the end of the MODEL statement, you can compare the confidence intervals of the two variables to see if there is a statistical difference by checking if there is an overlap of the two confidence intervals.
It should also be noted that since you have used the Cox proportional hazards model, the proportional hazards (PH) assumption should be examined before you use this model to make statistical inferences.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.