Description Usage Arguments Value Author(s) Examples
This function generate samples from an approximated posterior of a fitted model, ie an inla-object
1 2 | inla.posterior.sample(n = 1L, result, hyper.user.scale = TRUE, use.improved.mean = TRUE)
|
n |
Number of samples. |
result |
The inla-object, ie the output from an |
hyper.user.scale |
Logical. If |
use.improved.mean |
Logical. If |
A list of the samples, where each sample is a list with
names hyperpar
and latent
, and with their marginal
densities in logdens$hyperpar
and logdens$latent
and the joint density is in logdens$joint
. THIS IS AN
EXPERIMENTAL FUNCTION AND CHANGES MAY APPEAR AT ANY TIME!
Havard Rue hrue@math.ntnu.no
1 2 | r = inla(y ~ 1 ,data = data.frame(y=rnorm(1)), control.compute = list(config=TRUE))
samples = inla.posterior.sample(2,r)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.