0
$\begingroup$

If my model already has an interaction term (ex. sexHispanic ethnicity), how do I test the Cox proportional hazards assumption using interaction with time-dependent covariates? Would I enter timesex timeHispanic sexHispanic and sexHispanictime? I am using SPSS so I need to test the Cox PH assumption using time-dependent interaction terms since I cannot use Schoenfoeld residuals.

$\endgroup$
2
  • $\begingroup$ SPSS is extremely limiting. The PH assessment you seek is automatically provided in the free R survival package. $\endgroup$ Commented Sep 22, 2023 at 17:13
  • $\begingroup$ @FrankHarrell, do you know if all 3 interaction terms with time, including a 3-way interaction, would need to be included? $\endgroup$
    – maile
    Commented Sep 22, 2023 at 19:00

1 Answer 1

1
$\begingroup$

As Frank Harrell says in a comment, the freely available R survival package provides tools for evaluating how well the proportional hazards (PH) assumption is met by a Cox model. The scaled Schoenfeld residuals provide the basis for this evaluation. They provide a simple and well-respected way to evaluate PH. Vignettes explain how to use the package and issues involving time-dependent covariates and coefficients. There is no inherent problem with evaluating PH for covariates whose values vary over time. (It's not even clear that you have such covariates, except for the ones that you seem to be generating via interactions with time.) You can (and should) use scaled Schoenfeld residuals, even if your current software package for some reason doesn't provide them.

PH evaluation based on scaled Schoenfeld residuals doesn't require any interactions with time. If PH doesn't hold for some predictor, then an interaction of that predictor with some function of time (effectively turning it into a time-varying covariate) is a way to model a time-varying coefficient for that predictor, as explained in the R time dependence vignette. But if PH holds well enough, based on your evaluation of scaled Schoenfeld residuals, there's no need to construct interactions with time.

For evaluating PH, an interaction term is no different from other predictors in the model. If you use the tools provided by R, the test on an interaction term will be done directly, along with tests on the other predictors and a global test for the model as a whole.

$\endgroup$
1
  • 1
    $\begingroup$ One minor comment @EdM - the interaction with time is no different in its interpretation but takes the special likelihood for time-dependent-covariates, i.e., you can't just add the interaction to a regular Cox model that has one observation per subject. $\endgroup$ Commented Sep 23, 2023 at 11:53

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.