Laplace.sampling.lr: Langevin-Hastings MCMC for conditional simulation (low-rank...

Description Usage Arguments Details Value Author(s) See Also

Description

This function simulates from the conditional distribution of the random effects in a binomial mixed model.

Usage

1
2
Laplace.sampling.lr(mu, sigma2, K, y, units.m, control.mcmc, messages = TRUE,
  plot.correlogram = TRUE)

Arguments

mu

mean vector of the linear predictor.

sigma2

variance of the random effect.

K

random effect design matrix, or kernel matrix for the low-rank approximation.

y

vector of binomial observations.

units.m

vector of binomial denominators.

control.mcmc

output from 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.

Details

Conditionally on Z, the data y follow a binomial distribution with probability p and binomial denominators units.m. Let K denote the random effects design matrix; a logistic link function is used, thus the linear predictor assumes the form

\log(p/(1-p))=μ + KZ

where μ is the mean vector component defined through mu. The random effect Z has iid components distributed as zero-mean Gaussian variables with variance sigma2.

Laplace sampling. This function generates samples from the distribution of Z given the data y. Specifically, a Langevin-Hastings algorithm is used to update \tilde{Z} = \tilde{Σ}^{-1/2}(Z-\tilde{z}) where \tilde{Σ} and \tilde{z} are the inverse of the negative Hessian and the mode of the distribution of Z given y, respectively. At each iteration a new value \tilde{z}_{prop} for \tilde{Z} is proposed from a multivariate Gaussian distribution with mean

\tilde{z}_{curr}+(h/2)\nabla \log f(\tilde{Z} | y),

where \tilde{z}_{curr} is the current value for \tilde{Z}, h is a tuning parameter and \nabla \log f(\tilde{Z} | y) is the the gradient of the log-density of the distribution of \tilde{Z} given y. The tuning parameter h is updated according to the following adaptive scheme: the value of h at the i-th iteration, say h_{i}, is given by

h_{i} = h_{i-1}+c_{1}i^{-c_{2}}(α_{i}-0.547),

where c_{1} > 0 and 0 < c_{2} < 1 are pre-defined constants, and α_{i} is the acceptance rate at the i-th iteration (0.547 is the optimal acceptance rate for a multivariate standard Gaussian distribution). The starting value for h, and the values for c_{1} and c_{2} can be set through the function control.mcmc.MCML.

Value

A list with the following components

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

h: vector of the values of the tuning parameter at each iteration of the Langevin-Hastings MCMC algorithm.

Author(s)

Emanuele Giorgi e.giorgi@lancaster.ac.uk

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

See Also

control.mcmc.MCML.


barryrowlingson/PrevMap documentation built on May 11, 2019, 6:24 p.m.