arms.sample: Adaptive Rejection Metropolis Sampler

arms.sampleR Documentation

Adaptive Rejection Metropolis Sampler

Description

Generate a sample from a probability distribution with Adaptive Rejection Metropolis Sampling

Usage

arms.sample(target.dist, x0, sample.size, tuning=1)

Arguments

target.dist

Target distribution; see make.dist.

x0

Numeric vector containing initial state.

sample.size

Sample size requested.

tuning

Scale for initial envelope; see details.

Details

arms.sample implements Adaptive Rejection Metropolis Sampling (Gilks, Best, and Tan, 1995). As described by Gilks et al, a user of ARMS must specify an initial envelope roughly approximating the target density. This implementation attempts to provide a simpler interface for users by generating an envelope automatically.

To form an initial envelope for coordinate (i), four abscissae are needed. One is x0. The sampler tries points with abscissae x0[i]-2^k*tuning and x0[i]+2^k*tuning for whole-numbers k until points with log densities smaller than that at x0 are found, then chooses a fourth point from the interior of the two found points. (Specifically, the interval between x0 and the lowest density found point is binary-searched until a point with log-density larger than the found point is located.)

This scheme for defining an envelope does not depend on the current state in the dimension being sampled. For discussion of why this must be the case, see see Gilks, Neal, Best and Tan (1997).

Value

A list with elements X, evals, and rejections, following the calling convention of compare.samplers. rejections indicates how many Metropolis-Hastings proposals were rejected.

References

Gilks, W. R., Best, N. G., and Tan, K. K. C. (1995) “Adaptive Rejection Metropolis Sampling within Gibbs Sampling,” Applied Statistics 44(4):455-472.

Gilks, W. R., Neal, R. M., Best, N. G., and Tan, K. K. C. (1997) “Corrigendum: Adaptive Rejection Metropolis Sampling,” Applied Statistics 46(2):541-542.

See Also

compare.samplers


SamplerCompare documentation built on April 24, 2023, 9:09 a.m.