oblique.hyperrect.sample: Eigendecomposition-based hyperrectangle method

Description Usage Arguments Details Value References See Also

View source: R/oblique-hyperrect.R

Description

Generate a sample from a probability distribution with the hyperrectangle method with slice approximation axes oriented along eigenvectors.

Usage

1
2
3
oblique.hyperrect.sample(target.dist, x0, sample.size, tuning=1,
                    edge.scale=5, cheat=FALSE)
cheat.oblique.hyperrect.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 of initial/fallback hypercube edge; w in Thompson (2011, ch. 3).

edge.scale

The initial slice approximation has edges of length equal to the square root of the corresponding eigenvalue times this factor.

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 the hyperrectangle method (Neal, 2003, sec. 5.1) with the hyperrectangle oriented along estimates of the eigenvectors of the target distribution's covariance, as described by Thompson (2011, ch. 3). The functions follow the interface used by compare.samplers. Calling cheat.oblique.hyperrect.sample is equivalent to calling oblique.hyperrect.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

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

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

See Also

compare.samplers, univar.eigen.sample


SamplerCompare documentation built on Oct. 22, 2021, 9:14 a.m.