inla.zmarginal for inlabru object

11 views
Skip to first unread message

alessandro dalla bona

unread,
Nov 17, 2022, 2:46:16 PM11/17/22
to R-inla discussion group
Hi everyone! 
I would like to know if there is an analogous function/procedure for bru objects like:

fit <- inla(...)
field.results <- inla.spde.result(inla = fit, name = " ... ", spde = spde, do.transf = TRUE)
var.nom.marg = field.result$marginals.variance.nominal[[1]] 
inla.zmarginal(var.nom.marg)

The problem is that I used spde.posterior but I cannot use inla.zmarginal tu quickly get the summary for range and variance (those are the values I'm interested in).

Thank you very much,
Alessandro

Finn Lindgren

unread,
Nov 17, 2022, 2:57:00 PM11/17/22
to alessandro dalla bona, R-inla discussion group
Hi,

The exact same code should work; bru estimation objects are inla estimation objects with added information, so all the regular inla functions should work (until very recently some of the functions in inla had incorrect checks for the object class; not sure if there has been a new build since I fixed that, but inla.spde.result should be ok, I think.)

Finn

On 17 Nov 2022, at 19:46, alessandro dalla bona <aledall...@gmail.com> wrote:

Hi everyone! 
--
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/62daacfc-3df6-48e9-b563-8dff7699ee1bn%40googlegroups.com.

Helpdesk (Haavard Rue)

unread,
Nov 17, 2022, 3:00:41 PM11/17/22
to Finn Lindgren, alessandro dalla bona, R-inla discussion group
If you mean this commit

https://github.com/hrue/r-inla/commit/c6134f5396598a34787b4c90cd7275b2268b0ad2

then there is no build yet. I can do that over the weekend
Håvard Rue
he...@r-inla.org

alessandro dalla bona

unread,
Nov 17, 2022, 3:10:27 PM11/17/22
to R-inla discussion group
Oh I'm so sorry, I tried before and it didn't work, now I specified the argumenst in the inla.spde.result function and it actually works. 
Thank you, sorry for such a stupid question.
Alessandro

Reply all
Reply to author
Forward
0 new messages