Interval censoring: missing time2

44 views
Skip to first unread message

Lukas Van Riel

unread,
Feb 20, 2025, 2:42:07 PMFeb 20
to R-inla discussion group
Hi,

I'm exploring whether the INLAjoint package would be suitable to model my dataset as a multistate model without absorbing states. For this I generated a small mock dataset. I succeeded running the model when coding the transitions as observed (event=1), but when I try to run it it as interval censored (event=3), It get the following error:

Error in inla.surv.1(time, event, time2, truncation, cure, .special = .special) :
  'time2' has to be present for interval censored data or in-interval events

I initiate time2 when I create the survival objects, so I'm not sure how to resolve this. I have included a script that should reproduce the error. Do you have a suggestion how to resolve this?

Thank you
Lukas
MWE-Missing.time2.R

Denis Rustand

unread,
Feb 20, 2025, 3:05:10 PMFeb 20
to R-inla discussion group
Hi Lukas,

Your code seems to run fine for me, are you using the latest GitHub version of the package? You can get it here (see section "Install"): github.com/DenisRustand/INLAjoint

I'll update the CRAN version soon.

Best,
Denis Rustand

Lukas Van Riel

unread,
Oct 27, 2025, 11:07:41 PM (2 days ago) Oct 27
to R-inla discussion group

Hi Denis,


Thank you for looking into my code. Updating did resolve the issue, sorry for not reporting back earlier.


I'm reaching out about a new issue related to interval censoring in reversible multi-state models. Please let me know if I should open a new thread instead of continuing here.


For context: I'm trying to model forest plot transitions between classes over ~60 years with approximately decadal observations. To validate my approach before applying it to my real 9-class dataset, I've created a minimal 3-state example with known parameters.


The problem is this: With exact transition times, INLAjoint recovers all parameters (shape, intercepts, covariates). However, when I introduce interval censoring, simulating artificial observation times to mimic my real dataset, Weibull shape parameters are systematically higher than their true values while intercepts are biased towards lower values (more negative). This pattern is consistent across all 6 transitions in my 3-state model. Covariate coefficients show a mixed response, most are retrieved within the credible interval but some lie outside significantly, sometimes even with a sign switch. 


I've tried several things to resolve this: Including/excluding individual ID as frailty, collapsing observation intervals to minimize redundancy (while retaining all information), reducing transition rates to minimize indirect paths, running gap time interpretations instead of clock-forward (although this is tricky in the case of interval censoring). None of these approaches eliminated the shape parameter bias, though they did fix some covariate sign issues related to misclassified indirect transitions.


I'm not sure what else I could try. I keep coming back to the same questions, I was hoping you can help me with some of them:

  • Does INLA support using the weibullsurv survival specification for multi-state models with interval censoring in competing risks format, or should I use something different? Ideally the output of my model would be transformed to transition probabilities afterwards so I would prefer to use a parametric approach.

  • Could it be related to how INLA(joint) interprets time intervals in multi-row-per-individual data? Does it treat intervals as gap-time durations rather than calendar time windows? 

  • Are there known limitations for interval-censored competing risks models that might explain systematic shape parameter bias while covariate effects remain unbiased (maybe something about trading off scale and shape parameters)?

  • Do you know of any working examples of interval-censored multi-state models I could use as reference? I’m looking for the correct way to implement this but I do not find a case that exactly matches mine?

In case it could be helpful, I attached a minimal working example that shows the encountered bias. It runs in a few minutes on my personal machine.


Thank you for your time,

Lukas Van Riel


Op donderdag 20 februari 2025 om 15:05:10 UTC-5 schreef Denis Rustand:
Inlajoint-IntervalCensoring.R

Denis Rustand

unread,
Oct 28, 2025, 5:45:54 AM (2 days ago) Oct 28
to R-inla discussion group
Hi Lukas,

I think the main issue is that you do not account for delayed entry in the at-risk for each transition, while you did it for the "exact times" model. For example if we look at the first individual and the first transition. This individual is observed from time 25 to 34 and right censored, this should be a left-truncated observation. Then this individual has an interval censored event between time 34 and 49, this is fine no need for truncation there as the boundaries are defined by the interval censoring. In the dataset you shared, when you build the survival outcome for each transition (lines 408-414), you should add this truncation for the lines that are not interval censored and do not start at time 0. You also need to properly set the right censoring time for these observations as it uses the "time" argument and not "time2".

In the attached code, I added this truncation and the results look better, although not perfectly aligned. I guess this may be related to the loss of information from the interval censoring and/or the data transformation. For example the first individual is entering the at-risk at time 20 in the "exact times" data while he enters at 25 in the "interval-censored" data, I am not sure why but this could contribute to the differences in the results.

Best,
Denis Rustand
Inlajoint-IntervalCensoring_DR.R

Lukas Van Riel

unread,
Oct 28, 2025, 11:01:48 PM (2 days ago) Oct 28
to R-inla discussion group
Hi Denis,

Thank you for your swift response and for helping to solve the problem. 

Running your suggestion indeed improves the estimates for the intercepts and hyperparameters. However, it seems to recover the covariate coefficients less reliably. Is there anything else I could try to add to the dataset or model specification to improve this? 

I found indications that the covariate issue might be because of the existence of indirect paths (due to the long observation intervals). However, decreasing transition rates to decrease indirect paths did make the results for intercepts and hyperparameters worse.

Regarding the loss of information due to interval censoring: wouldn't INLA widen its credible intervals to reflect its uncertainty in the case of interval censoring? Or is that not how it works?

Do you think INLA(joint) is suitable to model this kind of multi-state model? Do you have any knowledge of a multi-state model with interval censoring that was modelled with INLA?

Happy to share any code if that would be helpful.

Thank you,
Lukas

Op dinsdag 28 oktober 2025 om 05:45:54 UTC-4 schreef Denis Rustand:

Denis Rustand

unread,
Oct 29, 2025, 4:46:23 AM (yesterday) Oct 29
to R-inla discussion group
Hi Lukas,

Overall the main issue with interval censoring in multi-state models is the entry time in the at-risk period. If you consider an illness-death model where an individual is interval censored for the transition from state 1 (Healthy) to state 2 (Sick), the entry in the "at-risk" period for the transition from state 2 (Sick) to state 3 (Death) is also interval-censored, which is not something INLAjoint can handle at the moment and I am not aware of the alternative software that can handle this.

In the data you shared, as I mentioned in my previous message, for the exact data you have different entry times compared to the interval-censored (i.e. 20 vs. 25 for first individual). This should not be different as we need to know the exact entry time for both approaches and they should be the same, here the difference is likely introducing the bias you observe. You can try to use the true values for entry times to see if it fixes the bias.

When you don't have the true value from data simulation, I guess one option is to impute the entry time but probably not optimal, likelihood approaches may exist but are not implemented in INLA at the moment. Maybe sampling in the intervals and Bayesian averaging of the resulting models could work too... I am not very familiar with this.

Best,
Denis Rustand
Reply all
Reply to author
Forward
0 new messages