# Jointlcmm survival term: Do variables need to be time-independent?

I have a large dataset of within-individual repeated measures, where each participant has varying number of observations (multiple rows of data for each participant). Data include a time-dependent marker variable (dynamic risk), time-to-event data (recidivism), as well as demographic information and a separate risk score based on historical factors (static risk)

I am using JointLCMM to model trajectories of a marker variable (dynamic risk) while accounting for data missing due to survival events (recidivism). I am a bit confused about whether the variable used in the survival argument must be time independent.

As I had not been including covariates in the mixed-effects model

m<-JointLCMM(dynamic_risk~time,random = ~ time, subject = 'ID', mixture = ~ time,ng = 2, idiag = TRUE, data = data, link = "linear")


I hadn't thought to include them in the survival argument

survival=Surv(entry,exit, recidivism_flag)~dynamic_risk


Reading more on JointLCMM, it seems that this may be problematic, as my dynamic_risk variable is time-dependent.

Is it essential that the variables in the JointLCMM survival term be time-independent?

If time-independent covariates are essential for the survival term, should they be included in the mixed model as well?

With the JointLCMM() function you fit a latent class joint model. This models assumes that the association between the longitudinal outcome dynamic_risk and the risk of recidivism_flag is explained via latent classes. In other words, given that you know the class in which a subject belong, his/her dynamic_risk and risk of recidivism_flag are assumed to be independent.
Given this underlying assumption (which is also known as the conditional independence assumption), you would include the dynamic_risk again into your relative risk model as a time-varying covariate. If you have indications that this conditional independence assumption may not hold, you could fit a shared parameter joint model (that makes another type of conditional independence assumption) or include the linear predictor of the mixed model for dynamic_risk as a time-varying covariate in the relative risk model. The former can be done in the R packages JM and JMbayes. The latter is not yet available in a software packages as far as I know.