Closed Diego-FB closed 1 month ago
Hi,
thank you for your message !
The TimeDepVar in mpjlcmm works exactly the same as in Jointlcmm. For example is you specify survival = Surv(Tevent, Event) ~ Xt, TimeDepVar = 'Xt" in your model, this means that the baseline hazard (call it lambda0(t)) applies for the times beween 0 and Xt, and that after Xt, the hazard is lambda0(t) * exp(coefTimeDepVar), with coefTimeDepVar being the parameter associated to the Xt variable.
For a subject that has no valve replacement, you can specify Xt = Tevent in your dataset, or put Xt to NA. Both are equivalent, the value is internally checked and replaced by Tevent if it is missing (so that there is no effect of Xt for these subjects).
We have not planned to extend the mpjlcmm function with thresholds links yet. For your question about the categorical data, are you thinking of a (extension of) multinomial model ? This means that you will have one regression coefficient per category, so this can lead to much more parameters. And the results can be contradictory from one category to the other, so the conclusion will be tricky.
Best,
Viviane
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.
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.
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.
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