inla.knmodels example crashes

52 views
Skip to first unread message

pav

unread,
Jun 21, 2021, 2:45:53 PM6/21/21
to R-inla discussion group
I tried to run the example on the help page for inla.knmodels(), and it crashed the INLA system. When running with verbose=TRUE, the final message was:


GMRFLib version 3.0-0-snapshot, has recived error no [3]
Reason    : Matrix is (numerical) singular
Function  : GMRFLib_comp_posdef_inverse
File      : lapack-interface.c
Line      : 71
GitID     : file: lapack-interface.c  1f6a39183ef43d8ef33f10ff3f04fd13f8432758 - Mon Feb 22 21:27:50 2021 +0300

followed by the usual

Error in inla.inlaprogram.has.crashed() :

message. If it would help, I can post the entire verbose message; I don't really understand it.. Given the "experimental" warning about bym2, I tried again with bym and besag, but these crashed INLA too.

Can anyone help?

INLA version  21.02.33
Win10 (64bit)

Thanks!

pav

unread,
Jun 21, 2021, 3:50:57 PM6/21/21
to R-inla discussion group
ADDED: actually, "4d" works (with the original bym2), while both "4" and "4c" crash INLA.

Elias T. Krainski

unread,
Jun 21, 2021, 9:26:21 PM6/21/21
to pav, R-inla discussion group
There is a typo in the definition of the temporal graph... Please use the following

 tgraph <- sparseMatrix(i=c(2:10, 1:9), j=c(1:9, 2:10), x=1)

Elias

--
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 on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/46b3df7e-15ab-450e-8930-ecb4fce2feb7n%40googlegroups.com.

pav

unread,
Jun 24, 2021, 9:53:55 AM6/24/21
to R-inla discussion group
Just to complete the story:

Elias' note that there was a typo in the specification
of tgraph didn't solve the crash problem for me. (I'm
curious: do others experience the inla crash either with
or without the tgraph correction?) In a personal
communication he suggested adding

  control.inla=list(strategy='gaussian')

to the knmodels call. This worked for me (though
I don't understand why).

So a working version of the knmodels help-page
example is:

tgraph <- sparseMatrix(i=c(2:10, 1:9), j=c(1:9, 2:10), x=1)
res <- inla.knmodels(y ~ f(time, model='bym2', graph=tgraph) +
                       f(space, model='bym2', graph=graph),
                     data=dat, family='poisson', E=dat$E, progress=TRUE,
                     control.st=list(time=time, space=space,
                                     spacetime=spacetime, graph=graph,
type=c(4, '4c', '4d')),
                     control.compute=list(dic=TRUE, waic=TRUE, cpo=TRUE),
                     control.inla=list(strategy='gaussian'))


Thanks to Elias Krainski for all his help!
Reply all
Reply to author
Forward
0 new messages