Learn R Programming

PrevMap (version 1.5.4)

Laplace.sampling.SPDE: Independence sampler for conditional simulation of a Gaussian process using SPDE

Description

This function simulates from the conditional distribution of a Gaussian process given binomial y. The Guassian process is also approximated using SPDE.

Usage

Laplace.sampling.SPDE(
  mu,
  sigma2,
  phi,
  kappa,
  y,
  units.m,
  coords,
  mesh,
  control.mcmc,
  messages = TRUE,
  plot.correlogram = TRUE,
  poisson.llik
)

Arguments

mu

mean vector of the Gaussian process to approximate.

sigma2

variance of the Gaussian process to approximate.

phi

scale parameter of the Matern function for the Gaussian process to approximate.

kappa

smothness parameter of the Matern function for the Gaussian process to approximate.

y

vector of binomial observations.

units.m

vector of binomial denominators.

coords

matrix of two columns corresponding to the spatial coordinates.

mesh

mesh object set through inla.mesh.2d.

control.mcmc

control parameters of the Independence sampler set through control.mcmc.MCML.

messages

logical; if messages=TRUE then status messages are printed on the screen (or output device) while the function is running. Default is messages=TRUE.

plot.correlogram

logical; if plot.correlogram=TRUE the autocorrelation plot of the conditional simulations is displayed.

poisson.llik

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.

Value

A list with the following components

samples: a matrix, each row of which corresponds to a sample from the predictive distribution.

Details

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.

See Also

control.mcmc.MCML.