stepout.slice.sample: Univariate slice samplers

View source: R/basic-slice.R

stepout.slice.sampleR Documentation

Univariate slice samplers

Description

Generate a sample from a probability distribution with a slice sampler.

Usage

stepout.slice.sample(target.dist, x0, sample.size, tuning=1,
                     step.out=TRUE, limit=length(x0)*100)
interval.slice.sample(...)

Arguments

target.dist

Target distribution; see make.dist.

x0

Numeric vector containing initial state.

sample.size

Requested sample size.

tuning

Initial interval length for slice.

step.out

Flag indicating whether to expand the initial interval before proposing a new coordinate.

limit

A limit on the number of log-density evaluations per observation before sampling is aborted.

...

interval.slice.sample takes the same arguments as stepout.slice.sample, except step.out.

Details

stepout.slice.sample implements univariate slice sampling with stepping out as described in sec. 4 of Neal (2003). If step.out=FALSE or interval.slice.sample is called instead, no stepping out is performed; the wrapper function interval.slice.sample is provided for convenience when calling compare.samplers.

If target.dist is a multivariate distribution, each step of the Markov chain updates each coordinate once in sequence.

Value

A list with elements X, evals, and grads, following the calling convention of compare.samplers.

References

Neal, Radford M. (2003), “Slice Sampling,” The Annals of Statistics 31(3):705-767.

See Also

compare.samplers, hyperrectangle.sample


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