univar.eigen.sample: Eigendecomposition-based slice samplers

View source: R/univar-eigen.R

univar.eigen.sampleR Documentation

Eigendecomposition-based slice samplers

Description

Generate a sample from a probability distribution with slice sampling with univariate steps along eigenvectors.

Usage

univar.eigen.sample(target.dist, x0, sample.size, tuning=1,
                    steps.out=100, cheat=FALSE)
cheat.univar.eigen.sample(target.dist, x0, sample.size, tuning=1,
                    steps.out=100)

Arguments

target.dist

Target distribution; see make.dist.

x0

Numeric vector containing initial state.

sample.size

Sample size requested.

tuning

Initial slice approximation length.

steps.out

Maximum number of iterations the stepping out algorithm should run when choosing an initial slice approximation. Set to NULL to refrain from stepping out.

cheat

Set to true to use the covariance from target.dist instead of estimating it. This is not possible on real problems but can be useful for debugging.

Details

These two functions implement slice sampling with univariate steps along estimated eigenvectors. Thompson (2011, ch. 3) has details on the algorithms. The functions follow the interface used by compare.samplers. Calling cheat.univar.eigen.sample is equivalent to calling univar.eigen.sample with cheat=TRUE; it is provided as a convenience so that it can be passed directly to compare.samplers.

Value

A list with elements X, evals, and grads. See compare.samplers for more information.

References

Thompson, M. B. (2011), Slice Sampling with Multivariate Steps. http://hdl.handle.net/1807/31955.

See Also

compare.samplers, oblique.hyperrect.sample


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