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

I'm trying to check that the proportional hazards assumption is satisfied with all my variables in my Cox model.

 

I used 2 methods to do this, but they give different results.

 

First method:

Add time-dependent variable to the original model (in this case, a product of a variable of interest and logarithm of time variable was added for each covariate).

 

prog phreg data=data covsandwich;
class drinker meds;
model time*event(0)=drinker meds comorbs age avg_glucose avg_creatinine
t_drinker t_meds t_comorbs t_age t_avg_glucose t_avg_creatinine;
t_drinker=drinker*log(time); t_meds=meds*log(time); t_comorbs=comorbs*log(time); t_age=age*log(time); t_avg_glucose=avg_glucose*log(time); t_avg_creatinine=avg_creatinine*log(time);
id pracid;
run;

This method showed that proportional hazards assumption was satisfied for all variables because none of these time-dependent variables were significant.

 

 

Second method:

 

for continuous variables - plots of Shoenfeld residuals against the time variable

 

for categorical variables - plots of log-minus-log of the survival function against the time variable, stratified by the category levels.

e.g.

proc lifetest data=data plots=(s, lls);
time time*event(0);
strata drinker;
run;

 

This method showed that all the continous variables satisfied the proportional hazards assumption (graghs showed straight line), whilst it did not for one of the categorical variable (drinker) as the lines of the survival function crossed.

 

The first method and second method showed slightly different results (all covariates satisfy the PHA in the first, whilst it doesn't for the second). Could this be because the second analysis is unadjusted? I wonder whether it's fair to conclude that the PH assumption is satisfied as indicated by the first method, or whether it isn't because of the second method.

 

Many thanks for your help in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
JacobSimonsen
Barite | Level 11

You have proportional hazards if the difference of Log(-Log(kaplanmeier)) between the two groups under consideration is constant.

 

Not crossing Kaplan Meier curves does not imply proportional hazard rates. This just imply that one group has a higher risk than the other. 

View solution in original post

5 REPLIES 5
Reeza
Super User

In the first you're testing all assumptions at once. In the second you're testing each independently. 

 

Dani08
Obsidian | Level 7
Thanks for your reply, so would you say it is safe to say that the proportional hazards assumption is satisfied according to the first method?
Reeza
Super User

Unfortunately, it's not an exact science to determine if the PH assumption is violated. You have to make the call, especially knowing the KM curves cross for gender. One thing to consider is the p-value itself, if it's 0.0546, which is greater than 0.05 but close maybe it's still ok. It's a judgement call....

 

Another option is the ASSESS statement. I would suggest searching on Lexjansen.com to see how to use the ASSESS statement and then using that as another check. 

Dani08
Obsidian | Level 7
Thank you for your advice, will try the assess statement too.
JacobSimonsen
Barite | Level 11

You have proportional hazards if the difference of Log(-Log(kaplanmeier)) between the two groups under consideration is constant.

 

Not crossing Kaplan Meier curves does not imply proportional hazard rates. This just imply that one group has a higher risk than the other. 

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