DenisRustand / INLAjoint

Joint modeling multivariate longitudinal and time-to-event outcomes with INLA
16 stars 0 forks source link

Solution to 'program call crashed/failed and the maximum number of tries has been reached' #31

Closed bbb801 closed 3 months ago

bbb801 commented 3 months ago

Dear Dr Denis,

I am trying some two-part join models for semi-continuous longitudinal (and a survival outcome). However, I successfully run for some longitudinal biomarkers but failed for others, with the errors as shown below,

>   M13 <- joint(formLong = list(binary ~  stroke_category*lab_survival_days+  (1|id),
+                                Test_Result_Converted ~ stroke_category*lab_survival_days +  (1+lab_survival_days|id)),
+                formSurv = inla.surv(survival_days, status) ~ Age + Atrial_Fibrillation + Diabetes +
+                  Height + Hyperlipidemia + Maligancy + Sex + Weight + stroke_category, dataSurv=base_qmh,
+                dataLong = list(long_qmh_final, long_qmh_final), timeVar="lab_survival_days",
+                id = "id", corLong=TRUE,
+                control=list(int.strategy="eb"),
+                assoc = c("SRE", "SRE"),
+                family = c("binomial", "lognormal"))

 *** inla.core.safe:  The inla program failed, but will rerun in case better initial values may help. try=1/1 
Error in inla.core.safe(formula = formula, family = family, contrasts = contrasts,  : 
  The inla program call crashed.
The inla program failed and the maximum number of tries has been reached.

Is there any solution (increase the maximum no.) or suggestion for this issue? Thank you. image

Regards, Beato

DenisRustand commented 3 months ago

Hi,

Can you share a reproducible example? It is not obvious what is causing the crash here... You can reach me at INLAjoint@gmail.com if you want to share some private code/data.

Best, Denis Rustand

bbb801 commented 3 months ago

Thank you. I have send them to your email.

DenisRustand commented 3 months ago

Thanks, the reason for the error is that your outcome for the "lognormal" part for strictly positive values contains zeros. If your two-part model is supposed to do "probability of non-zero" in the binary part and "distribution of strictly positive values" in the continuous part, then you want to set those zeros to NA in the dataset for the continuous part. If you want to include the zeros in the continuous part (or negative values), you'll need to use a different likelihood (e.g., Gaussian).