CecileProust-Lima / lcmm

R package lcmm
https://CecileProust-Lima.github.io/lcmm/
48 stars 13 forks source link

TimeDepVar on mpjlcmm #263

Open Diego-FB opened 5 days ago

Diego-FB commented 5 days ago

Good morning @CecileProust-Lima, @VivianePhilipps, thank you so much for developing and doing all the maintenance as well as answering this issues.

We are working with cardiac imaging data and have developed a multivariate joint latent class mixed model using mpjlcmm(), recently we realized we needed to include a time-depending variable. This variable would describe the time point in which the patient had undergone a certain procedure (valve replacement). Not all patients had this procedure, so my doubts start here.

  1. We used TimeDepVar as described on documentation regarding Jointlcmm(). 'optional vector containing an intermediate time corresponding to a change in the risk of event. This time-dependent covariate can only take the form of a time variable with the assumption that there is no effect on the risk before this time and a constant effect on the risk of event after this time (example: initiation of a treatment to account for).' We do not understand if it the argument works in the same way in mpjlcmm(), because description in documentation is not the same.

  2. Assuming it does work in the same way, as not all patients had their valve replaced, we proceeded to fill the variable with latest 'alive' timepoint, to short of 'right censoring' as it would work on classical survival models. But we are not sure this is correct as we do not fully understand the argument, any clarification in this regard will be appreciated.

  3. Not regarding the 'TimeDepVar' but rather the link function for ordinal data 'thresholds' that is not yet ready for mpjlcmm(), wondering if this is something you are working on? And if not, what kind of error would we be making by treating the variable as categorical.

Kind regards from Madridm, we are great fans of your work