This function simulates from the conditional distribution of a Gaussian process given binomial y
.
The Guassian process is also approximated using SPDE.
Laplace.sampling.SPDE(
mu,
sigma2,
phi,
kappa,
y,
units.m,
coords,
mesh,
control.mcmc,
messages = TRUE,
plot.correlogram = TRUE,
poisson.llik
)
mean vector of the Gaussian process to approximate.
variance of the Gaussian process to approximate.
scale parameter of the Matern function for the Gaussian process to approximate.
smothness parameter of the Matern function for the Gaussian process to approximate.
vector of binomial observations.
vector of binomial denominators.
matrix of two columns corresponding to the spatial coordinates.
mesh object set through inla.mesh.2d
.
control parameters of the Independence sampler set through control.mcmc.MCML
.
logical; if messages=TRUE
then status messages are printed on the screen (or output device) while the function is running. Default is messages=TRUE
.
logical; if plot.correlogram=TRUE
the autocorrelation plot of the conditional simulations is displayed.
logical: if poisson.llik=TRUE
then conditional conditional distribution of the data is Poisson; poisson.llik=FALSE
then conditional conditional distribution of the data is Binomial.
A list with the following components
samples
: a matrix, each row of which corresponds to a sample from the predictive distribution.
Binomial model. Conditionally on the random effect \(S\), the data y
follow a binomial distribution with probability \(p\) and binomial denominators units.m
. The logistic link function is used for the linear predictor, which assumes the form $$\log(p/(1-p))=S.$$
The random effect \(S\) has a multivariate Gaussian distribution with mean mu
and covariance matrix Sigma
.