1
$\begingroup$

I'm using a Cox model with 100k subjects and 1624 events to model the effects of a treatment with respect to 49 covariates, 127df.

Due to proportional hazard violation of some continuous variables, I've added restricted cubic splines using rcs(). Based on the p-values provided by cox.zph (which I've decided at 0.01 due to my sample size), the variables that previously violated the PH assumption no longer do.

However, it seems worth investigating this further instead of simply relying on the p-values in cox.zph. However, my understanding tells me that visualization of Schoenfeld plots after rcs() transformation has little value in doing this.

My questions thus are:

  1. How, then, would one investigate further if the PH assumption is truly satisfied after applying restricted cubic splines?

  2. Can this be visualized in a convenient way similar to how scaled Schoenfeld plots are used?

$\endgroup$

1 Answer 1

2
+50
$\begingroup$

The R survival package's cox.zph function has a "terms" option to combine all the terms relating to one predictor into one sub-linear predictor. Then you get an overall assessment of proportional hazards from the collapsed terms. It's difficult to plot what's going on but you can compute terms with predict(..., type='terms') and refit the model with the collapsed variables for purposes of getting smoothed scaled Schoenfeld residual plots. A related example may be found here. cox.zph also gives you multiple degree of freedom "chunk" tests of proportional hazards for all the spline terms without creating collapsed variables, as shown in an example there.

$\endgroup$
9
  • $\begingroup$ Your help is appreciated as always Professor Harrell. I've read parts of your book many times, I will look closely again at this part now. How reliable are the plots composed of these computed terms then? Additionally, if only certain of the portions of the variable after splining significantly violate the PH assumption (e.g., rcs(x)'' is significant but rcs(x)' and rcs(x) are not), how would you suggest tackling this? I don't recall having seen this described anywhere $\endgroup$
    – JED HK
    Commented Aug 23, 2022 at 13:21
  • 1
    $\begingroup$ Don't look at individual components of splines. Look overall. $\endgroup$ Commented Aug 23, 2022 at 13:26
  • $\begingroup$ If I follow your advice and the link you send, some of my variables that previously had reasonable looking Schoenfeld curves with small error bars now change in magnitude and direction drastically, with much larger error bars (pvalues are comparable). I think this is suggestive of improperly specified functional form, although I can't imagine this being the case using rcs() (especially because most continuous variables were significantly nonlinear, according to pspline() and Poisson plots. Any thoughts here Professor Harrell? This should be the final piece of my analysis, help appreciated $\endgroup$
    – JED HK
    Commented Aug 23, 2022 at 13:59
  • 1
    $\begingroup$ I very much doubt it's a functional form problem. The method of combining terms is more reliable and doesn't depend on how splines are constructed, so I'd trust it more. $\endgroup$ Commented Aug 23, 2022 at 18:44
  • 1
    $\begingroup$ Couple the plots with the Z:PH test statistic and also take into account the scale of the plots. Sometimes the scale is exaggerated and the non-PH isn't as large as you initially think. $\endgroup$ Commented Aug 23, 2022 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.