Which survival packages in R explicitly allow for time dependent covariates?

By explicitly, I mean that the package allows its models to accept a survival object with the form


For example, the cox proportional hazards model with time dependent covariates has the form:

coxph(Surv(start, stop, arrest.time) ~ fin + age + age:stop + prio, data=Rossi.2)

I would like to identify packages with more powerful models that accept this form.


1 Answer 1


A more powerful model to achieve this, is a relatively new methodology that has been proposed by Wulfsohn and Tsiatis, 1997 (see also an important contribution from Henderson, Diggle and Dobson, 2000) is the Joint modelling of longitudinal and survival data.

The model consists of two parts, the longitudinal submodel:

$$ y_i(t_{ij}) = W_i(t_{ij}) + e_{ij} ~~~, e \sim \text{N}(0,\sigma_e^2)$$

with $ W_i(t_{ij}) = x_i'(t_{ij}) \beta + z_i'(t_{ij}) b_i + u_i \delta $

and the survival submodel:

$$ h_i(T_i) = h_0(T_i) \exp(\alpha W_i(T_i) + \phi v_i) $$

with $W_i(T_i) = \beta_{0i} + \beta_{1i} T_i + \delta u_i$

and the estimation is conducted via the joint likelihood. The motivation of this method is exactly what you need, to fit survival models with time-dependent covariates.

There are two packages in CRAN, the JM and the joineR, my preference is the first one, mainly due to its documentation. You can investigate further to see the modifications or options you may need for your problem.

  • $\begingroup$ The JM package looks fascinating. I'm primarily concerned with predictive accuracy, not interpreting the covariates. I wonder if the submodels could be swapped out for more powerful algorithms, like random forests. $\endgroup$ Aug 19, 2014 at 17:04
  • $\begingroup$ I've actually built my own solution from scratch to these types of problems, it'll be interesting to see how JM models compare. $\endgroup$ Aug 19, 2014 at 17:23
  • $\begingroup$ I don't know about random forests, but if you have built these models from scratch, you definitely know how to work on extending things further. Have a look at recent papers for applications, etc. $\endgroup$
    – Steve
    Aug 19, 2014 at 17:26

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.