Edit: added new plots generated with plot.cox.zph()
, to replace those I had generated with survminer::ggcoxzph()
, due to an error in the code of the latter as pointed out by EdM in a comment.
Recently I've been learning about Survival Analysis, and today I'm practicing checking the proportional hazards assumption of a Cox PH regression.
I've read that plotting the Schoenfeld residuals of a certain predictor is a way of assessing the validity of the proportional hazards assumption for that predictor. As I understand it, if the trend line through those residuals is not flat then it suggests the proportional hazards assumption is not valid for that predictor.
But having just done this for two predictors in my Cox PH regression, I am perplexed by the fact that the covariate with the wigglier trend through its Schoenfeld residuals is associated with a much higher p-value than that of the covariate with the less wiggly trend:
The trend in the upper plot is associated with a p-value of 0.887, while that of the lower plot is 0.076.
My question is: why does the wigglier Schoenfeld residual trend have a much higher associated p-value in this case? I assume my being perplexed by this has to do with some lack of understanding of the concepts at play.
survminer
package or some derivative package that has a SERIOUS CODING ERROR in its Schoenfeld residual plotting. See this page for how to proceed. Please replace your plots with plots done correctly as explained on the linked page, as in their current form they are essentially uninterpretable. $\endgroup$plot.cox.zph()
, as you suggest in your answer to that other question. I'm still confused as to why the wigglier trend has a much higher p-value in this case. Can you offer any insights based on the new plots? $\endgroup$