Closed NewUser36 closed 1 year ago
Hi,
I just made a couple changes in INLAjoint, the latest release should be able to deal with this model. Please update INLAjoint and add "dataSurv=pbc" to your joint() call and let me know if it works.
Best, Denis
It works now with v23.05.04-2. Thank you!
Hello!
I'm trying to use
INLAjoint
to train a joint model for survival and longitudinal data with left-truncation and time-varying covariates.I have a longitudinal variable that I want to model using a mixed effect model, but there are also time-varying covariates I want to use in the survival submodel, but not as longitudinal variables. I simply want to use them in the survival part as one would to with a Cox model with time-varying covariates (which are called "exogenous time-dependent covariates" in Rizopoulos' book "Joint Models for Longitudinal and Time-to-Event Data").
Here's a toy dataset to show what I want to do.
It works using
JMbayes2
. Indeed, the Cox model can use time-dependent variables, serBilir and spiders in this example:If I wanted to do a simple Cox model with
R-INLA
with delayed entries (and time-varying covariates), I could dowhich gives similar results to the
coxph
function.Now, I want to do the same thing I did with
JMbayes2
, but this time with thejoint()
function from theINLAjoint
package. I tried the following code, which is not working.When the data for the survival model has one line per observation, it works. But, as I previously said, I have time-varying covariates in the data that I want to use for the survival model, and I do not want to model these variables using the formLong argument.
I wanted to know if it possible to do this with INLAjoint (or maybe with R-INLA?).
Thanks!