I do not think the 'selection' argument in posterior.sample was that
great of an idea as it onle save storage not computational cost, and it
just lead to confusion, so...
I rather prefer to just use inla.posterior.sample.eval to exact terms
you like. there is a vignette about this function, please check (need
new testing version).
there is an example
n <- 100
x <- rnorm(n)
xx <- rnorm(n)
y <- rnorm(n)
r <- inla(y ~ 1 + x*xx,
data = data.frame(y, x, xx),
control.compute = list(config = TRUE))
fun <- function() {
return (c(x, xx, get("x:xx")))
}
xx <- inla.posterior.sample(1000, r)
coeffs <- inla.posterior.sample.eval(fun, xx)
> --
> 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/caab3dc3-1fef-492c-8aaf-60eb211b4f5en%40googlegroups.com
> .
--
Håvard Rue
he...@r-inla.org