Assertion `g->n == gen_len_At' failed

6 views
Skip to first unread message

Thierry Onkelinx

unread,
Dec 12, 2025, 9:53:51 AM (4 days ago) Dec 12
to R-inla discussion group
Dear all,

I have a dataset with a response variable that has about 70% missing data. I want to do predictions for these observations. My strategy is to first fit the model on the subset without the observation with missing response variable and with the default control.compute settings.

Then I refit the model on the full dataset using the control.update argument and with updated control.compute settings (dic, waic, cpo and config all TRUE). Sometimes I get the error message below.

inla.mkl: pre-opt.c:663: GMRFLib_preopt_init: Assertion `g->n == gen_len_At' failed.
Aborted (core dumped)

 *** inla.core.safe:  The inla program failed, but will rerun in case better initial values may help. try=1/1
inla.mkl: pre-opt.c:663: GMRFLib_preopt_init: Assertion `g->n == gen_len_At' failed.
Aborted (core dumped)

Can someone clarify the error message? When I remove some datapoint with missing response, refitting the model works.

Best regards,

Thierry


ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry....@inbo.be
Havenlaan 88 bus 73, 1000 Brussel
Postadres: Koning Albert II-laan 15 bus 186, 1210 Brussel
Poststukken die naar dit adres worden gestuurd, worden ingescand en digitaal aan de geadresseerde bezorgd. Zo kan de Vlaamse overheid haar dossiers volledig digitaal behandelen. Poststukken met de vermelding ‘vertrouwelijk’ worden niet ingescand, maar ongeopend aan de geadresseerde bezorgd.
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data. ~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////


Helpdesk (Haavard Rue)

unread,
Dec 12, 2025, 10:37:36 AM (4 days ago) Dec 12
to Thierry Onkelinx, R-inla discussion group

Hi

its a check for internal consistency, so if its fail, something is wrong and not
ment to be.

I'm unable to create an example where this check fail (never seen it before).
So I need to rerun it here to locate the source

I presume you have a recent version of R-INLA and R-4.5

best
H
> --
> You received this message because you are subscribed to the Google Groups "R-
> inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to r-inla-discussion...@googlegroups.com.
> To view this discussion, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/CAJuCY5xC0VzbLpAnn9BG9x-Tid1Ua9c_Xnh2dWktVyL7ZXA_fw%40mail.gmail.com
> .

--
Håvard Rue
he...@r-inla.org
Reply all
Reply to author
Forward
0 new messages