To analyze the time to event data (or survival analysis in the early days), the most commonly used approaches are the non-parametric method (such as log-rank test) and the semi-parametric method (Cox proportional hazard regression model). There are a lot of discussions about checking the assumption of the proportional hazard that is defined as the time independence of the covariates in the hazard function, that is, the ratio of the hazard function for two treatment groups with different regression covariates does not vary with time.
If the proportional hazard assumption does not hold,
- the non-parametric log-rank test is still valid, but the statistical power will be decreased
- the semi-parametric method of Cox proportional hazard regression will be invalid
Proc lifetest plot=(s);
Time aval*cnsr(1);
Strata trt01p;
Run;
Log Log Survival Plot
This plots the log of negative log of estimated survivor functions versus the log of time. The y-axis is
log(-log(Survival)) and the x-axis is log(time). We can visually check if there are two straight parallel lines suggesting the proportional hazards. The log log survival plot below may suggest the minor deviation from the proportional hazard assumption, but may still be ok (since there is no line crossing).
Proc lifetest plot=(lls);
Time aval*cnsr(1);
Strata trt01p;
Run;
Residuals are defined for the proportional hazards regression model introduced by Cox
(1972). These residuals can be plotted against time to test the proportional hazards
assumption. Histograms of these residuals can be used to examine fit and detect outlying
covariate values.
The Schoenfeld residual plot below suggests that the proportional hazard assumption holds (the horizontal line with slop = 0), but there seems to be an outlier (circled in yellow).
Schoenfeld residual plot can be generated with two steps: obtain the Schoenfeld residuals from the model fit and then use a graphic tool to draw the plots.Proc phreg ;
Class trt01p (ref='N');
Model aval*cnsr(1) = trt01p;
output out= phcheck ressch = schres;
run;
Proc sgplot data=phcheck;
Loess x = aval y = schres / clm;
run;
Tests by Including Time-Dependent Covariates in the Cox Model
Generate the time-dependent covariates by creating interactions of the predictors and a function of survival time and include in the model. If any of the time-dependent covariates are significant then those predictors are not proportional.
In SAS it is possible to create all the time-dependent variables inside Proc Phreg. Furthermore, by using the test statement, it is possible to test all the time-dependent covariates all at once.
Proc phreg;Model aval*cnsr(1) = age treat aget treatt; *treat has to be numeric values;aget = age*log(aval); *Creating time dependent age variable (time*age interaction);treatt = treat*log(aval); *Creating time dependent age variable (time*treatment interaction);TestAll: TEST aget, treatt; *test PH for all time dependent covariates;run;
Where 'TestAll' is the label and the TEST statement tests linear hypotheses about the regression coefficients. PROC PHREG performs a Wald test for the joint hypothesis specified in a single TEST statement. Each equation specifies a linear hypothesis; multiple equations (rows of the joint hypothesis) are separated by commas.
This approach is based on the paper by Lin DY, Wei LJ, and Ying Z. (1993), “Checking the Cox Model with Cumulative Sums of Martingale-Based Residuals” Biometrika, 80, 557–572 and is built into SAS Proc PHREG with ASSESS statement.
In SAS, the ASSESS statement with the PH option provides an easy method to assess the proportional hazards assumption both graphically and numerically for many covariates at once.
proc phreg;class trt01p(ref='N');model aval*cnsr(1)=trt01p age / rl ties=efron;assess PH / resample seed=123456;run;
- Example 7.42: Testing the proportionality assumption
- UCLA Testing the Proportional Hazard Assumptions in Cox Models
- Score Test of Proportionality Assumption for Cox Models
- A Handbook of Statistical Analyses Using R
- How to evaluate the PH assumption?
The LogPlot Data Editor can take information from the keyboard, copy/paste, data collection, and import tools, among other places. Logplot
ReplyDelete