3
$\begingroup$

I'm working with the survival package in R. I fit a Cox proportional hazard model (coxph) and did a scaled Schoenfeld residual test (cox.zph). The test revealed a significant time varying effect of one of my variables. So I fit an extended Cox model with a time varying coefficient (tt feature in coxph). My question is simple: does is make sense to do a scaled Schoenfeld residual test on the time varying coefficients, and if they are not significant, conclude that the model is adequately accounting for the time varying effects?

$\endgroup$

1 Answer 1

3
$\begingroup$

I believe I have answered my own question, and it just required thinking through what Schoenfeld residuals represent. Schoenfeld residuals can be thought of as observed minus expected values of the covariates at each failure time. In a standard Cox model, these residuals can be inspected for temporal trends to determine if any of the covariates have a time varying effect.

However, when you incorporate a time-varying coefficient, the time-varying coefficient is a function of time. For example, in the model I've been working with, the time-varying coefficient is described with two parameters: a slope and intercept defining a linear relationship between the coefficient and time. It seems that Schoenfeld residuals can technically be computed with time-varying coefficients (and cox.zph allows you to do it), however I don't see how they can be interpreted sensibly. You will get one set of Schoenfeld residuals for the intercept and another set for the slope, but it makes no sense to ask how the observed/expected values of the slope and intercept change through time, because these parameters themselves describe how a coefficient changes through time: the intercept corresponds to the expected value of the time varying coefficient when t = 0, and together with the slope, the two parameters define the expected value of the coefficient at every time t.

If I'm off base here or if there is a better way to think through my question, I would still really appreciate answers from people more experienced with Cox models. For a few weeks now, I've been struggling to develop intuition for the various types of residuals defined for Cox models and best practices for assessing model fit with time varying coefficients (particularly as implemented with the time-transform feature in coxph).

$\endgroup$
1

Your Answer

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