r – Multi-State Cox Models: Different Formulas for Various Transitions Explored

cox-modelmarkov-processmulti-statersurvival

I'm using coxph from Therneau et al's survival package to model a multi-state system. Transitions include:

  1. Baseline -> Disease
  2. Disease -> Disease (re-hospitalization)
  3. Baseline -> Death
  4. Disease -> Death

(Death is an absorbing state.)

A key variable for predicting the Disease->Disease transition (re-hospitalization) is the number of days since the last hospitalization. (This is a time-varying model, and I increment time in 30-day increments until the next disease recurrence, final censoring, or death.)

As you can imagine, days since the last hospitalization doesn't even exist for people in the Baseline state. This is a problem for the survival package's multi-state model, because (at least as far as I understand its implementation), it wants to use the same variables to predict all of the transitions. (A slight caveat is that it can be forced to set the same coefficients for a variable for multiple transitions.)

Ideally, I'd like to be able to remove the days since the last hospitalization component of the model for the Baseline->Disease transition prediction. There are hacks to get around this, somewhat: I can set it to 0 (but then I'll get singularities, e.g., when I check cox.zph: Error in solve.default(imat, u): system is computationally singular). And sure, I can then set it to 0 +/- noise to prevent those singularities. But both of these approaches feel like technical workarounds that aren't strictly defensible.

Is there a way to remove a variable for a specific transition (or set of transitions)? If not, is there a generally accepted way of handling variables that only apply for some initial states and not others?

Best Answer

This is not a direct solution to your issue, but you could try using the mstate package.

After transforming data in long format with msprep, using expcovs you can create and add to the dataset transition-specific covariates, which you can then separately include in your model.

Considering the 4 transitions reported above, your Cox model should look something like this: coxph(Surv(Tstart, Tstop, status) ~ cov.1 + cov.2 + cov.3 + cov.4 + dayslasthosp.2 + dayslasthosp.4 + strata(trans), data=msdata), where .j identifies covariates specific to transition j. The covariate 'days since last hospitalization' (dayslasthosp) is included only for transitions 2 and 4.

The vignettes and tutorials available with the package are very informative, and guide you step-by-step through cases like this.