0
$\begingroup$

I am fitting a joint longitudinal and time to event model on production data with the aim of making dynamic predictions of the time of assembly of a machine. I am using JMbayes R package.

Among the time-dependent variables in the longitudinal part of the model I have a dummy variable that tells whether the mechanical part of the assembly is finished or not, this variable is 0 up to a certain time point, thereafter it becomes one from the time the mechanical part is completed to the time of the event (the assembly has been completed). So basically it is a one step function.

Now I am fitting a binomial(link="logit") longitudinal model for this variable using time fixed effect and a random effect for the order number related to the machine being assembled. I am linking this longitudinal model to the time event component using the "current value" association.

The idea is that if I complete the mechanical part of the assembly ahead of the historical average, it is likely that the total time of assembly will be lower, coversely if I spend much more time, it is likely that it will be higher.

I am sure this is not the right way to include this kind of variable in the model, both in modelling it in the longitudinal part of the model without taking into account that this is a binary step function over time monotone non-decreasing, and also for the way I linked it to the time component i.e. using the current value association, since the impact of the value of this variable depends on time: its value is always 0 during the first days of assembly and only from a certain time onwards it is informative.

Could you help me correct the model definition?

$\endgroup$
1
+50
$\begingroup$

From my understanding of your question, this sounds like it might better be handled with a 2-event survival model. You evidently have 2 events, the first representing finishing the "mechanical part of the assembly" and the second representing full assembly. You specify the data and model in a way that requires the first event to occur before the second. That way you can handle both the time to mechanical assembly and time to full assembly in a single model.

The R survival vignette outlines how to handle multi-state survival models. That should provide hints how to proceed even if you are using different software.

$\endgroup$
2
  • $\begingroup$ Thank you edm this is definitely what I need. Unfortunately I did’t find an R package that allow to make dynamic predictions using a joint model of longitudinal and multi state processes, is it possible to manage time varying covariates somehow in this kind of multi state models? In my case, for example, I have the number of missing components necessary for the assembly of the machine which decreases over time $\endgroup$ – Motmot Jan 31 at 22:15
  • $\begingroup$ @Motmot the (start, stop, event) format for survival data, along with an id for each individual, can be used for time-varying covariate values, with start, stop representing the time period over which covariate values are constant at the specified values on that data row for the individual. Multi-state models are handled with event as a factor variable instead of the usual 0/1 censored/event. I don't have personal experience combining time-varying covariates with multi-state models, however, so I'm not completely sure that those can be done together. $\endgroup$ – EdM Jan 31 at 22:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.