Marginals not computed

273 views
Skip to first unread message

Scott Burman

unread,
Sep 6, 2021, 10:04:15 PM9/6/21
to R-inla discussion group
Hello,

Thanks so much for all of the help of late. I have run my models, I have control.predictor=list(compute=TRUE) in my models, in my control.compute=list(dic=TRUE, cpo=TRUE, q=FALSE, waic=TRUE, smtp="pardiso", graph=FALSE, config=FALSE, mlik=TRUE, return.marginals=TRUE, return.marginals.predictor=TRUE, po=TRUE, hyperpar=TRUE, openmp.strategy="pardiso").

In my output, it says the following:
Posterior marginals for the linear predictor and
 the fitted values are computed

And yet, model$marginals.fitted.values and model$marginals.linear.predictor are both empty.

Is this a bug, or am I missing something?

Thanks
Scott

Helpdesk

unread,
Sep 7, 2021, 7:36:22 AM9/7/21
to Scott Burman, R-inla discussion group

you're right the msg is a bit confusing, I'll see if I can change that.
but here is a recent reply about the same.


yes, this change is intentional. adding the marginals of the linear
predictors take normally a lot of space, hence it is now by default
omitted even though it is computed internally. the summary statistics
are there though.

here is how to enable that if you want to.



> r <- inla(y~1,data=data.frame(y=0),
control.predictor=list(compute=TRUE))
> r$summary.linear.predictor
mean sd 0.025quant
Predictor.00000001 -7.063925267e-08 0.01584127732 -0.03109767579
0.5quant 0.975quant mode kld
Predictor.00000001 -1.77083949e-06 0.0311065814 7.726823128e-07
0.1048790746

> r$marginals.linear.predictor
NULL

> r <- inla(y~1,data=data.frame(y=0),
control.predictor=list(compute=TRUE),
control.compute=list(return.marginals.predictor=TRUE))
> r$summary.linear.predictor
mean sd 0.025quant
Predictor.00000001 -7.063925267e-08 0.01584127732 -0.03109767579
0.5quant 0.975quant mode kld
Predictor.00000001 -1.77083949e-06 0.0311065814 7.726823128e-07
0.1048790746

> r$marginals.linear.predictor
$Predictor.1
x y
[1,] -2.178148180e-01 1.411929654e-05
[2,] -2.094460017e-01 5.740707540e-04
[3,] -2.079734256e-01 6.216378795e-04
[4,] -1.969516747e-01 1.032968814e-03
[5,] -1.742518544e-01 2.669343824e-03
[6,] -1.601479432e-01 4.692449841e-03
[7,] -1.306888908e-01 1.446254770e-02






On Mon, 2021-09-06 at 19:04 -0700, 'Scott Burman' via R-inla discussion
> --
> 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/a89e15a9-e011-40de-b76a-b5e9e1a9cf87n%40googlegroups.com
> .

--
Håvard Rue
he...@r-inla.org

Reply all
Reply to author
Forward
0 new messages