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

Description Usage Arguments Details Value Author(s) See Also

View source: R/foo.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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.

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.

Value

A list with the following components

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

Author(s)

Emanuele Giorgi e.giorgi@lancaster.ac.uk

Peter J. Diggle p.diggle@lancaster.ac.uk

See Also

control.mcmc.MCML.


PrevMap documentation built on Oct. 7, 2021, 5:07 p.m.