Description Usage Arguments Details Value References See Also
Generate a sample from a probability distribution with a slice sampler.
1 2 3 | stepout.slice.sample(target.dist, x0, sample.size, tuning=1,
step.out=TRUE, limit=length(x0)*100)
interval.slice.sample(...)
|
target.dist |
Target distribution; see |
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. |
... |
|
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.
A list with elements X
, evals
, and grads
,
following the calling convention of compare.samplers
.
Neal, Radford M. (2003), “Slice Sampling,” The Annals of Statistics 31(3):705-767.
compare.samplers
,
hyperrectangle.sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.