Slice of Cherry Pie

Slice Sampler (Slice)


Aspect
Description
Acceptance Rate The acceptance rate is 1.
Applications This is a widely applicable, general-purpose algorithm.
Difficulty This algorithm is easy for a beginner. There are several algorithm specifications, and the defaults are recommended for automatic use with continuous parameters.
Final Algorithm? Yes.
Proposal Componentwise.

The origin of slice sampling dates back to Besag and Green (1993), and the current algorithm was introduced in Neal (1997) and improved in Neal (2003). In slice sampling, a distribution is sampled by sampling uniformly from the region under the plot of its density function. Here, slice sampling uses two phases as follows. First, an interval is created for the slice, and second, rejection sampling is performed within this interval.

Slice has five algorithm specifications: B defaults to NULL in which case blockwise updating is not performed, or B accepts a list in which each component contains a vector that indicates the position number of parameters to be sampled per block. Within each block, the order of evaluations is randomized each iteration. The Bounds specification accepts either a vector of length two for the lower and upper bound, or a list of vectors, one for each block. The m specification is the maximum number of steps (an integer in [1, ∞], and defaults to Inf), and may be a scalar or a list with a scalar per block. The Type specification accepts the following strings: "Continuous", "Nominal", or "Ordinal". This string may be a scalar, or a list of scalars, one for each block. This specification refers to the type of parameter, which may be continuous or discrete. Discrete slice sampling is performed either for nominal or ordinal parameters. Finally, the w specification accepts a scalar step size (in (0, ∞), and defaults to 1), or accepts a list of scalars, one for each block. Ideally, w is 3 standard deviations of the target distribution for continuous parameters, and is usually 1 for discrete parameters. All parameters in a block receive the same specifications, but specifications may differ by block.

The Slice algorithm implemented here is componentwise, and the algorithm for continuous parameters is based on figures 3 and 5 in Neal (2003), in which the slice is replaced with an interval I that contains most of the slice. For each parameter, an interval I is created and expanded by the "stepping out" procedure with step size w until the interval is larger than the slice, and the number of steps m may be limited by the user. The original slice sampler is inappropriate for the unbounded interval (-∞, ∞), and this improved version allows this unbounded interval by replacing the slice with the created interval I. This algorithm adaptively changes the scale, though it is not an adaptive algorithm in the sense that it retains the Markov property.

Blockwise sampling of a componentwise algorithm allows different specifications per block, and allows the user to control the order of evaluations, because blocks are processed in order, though parameters per block are selected in a randomized order.

The lower and upper bounds of interval I default to (-∞, ∞), and may be constrained for constrained parameters. Once the interval is constructed, a proposal is drawn randomly from within the interval until the proposal is accepted, and the interval is otherwise shrunk. The acceptance rate of this Slice algorithm is 1, though multiple model evalutations occur per iteration.

When this Slice sampler uses the default specifications and begins far from the target distributions, the time per iteration should decrease as the algorithm approaches the target distributions. Considerable time may be spent in the first iterations. One strategy may be to limit m.

This componentwise Slice algorithm has been noted to be more efficient than Metropolis updates, may be easier to implement than Gibbs sampling (Gibbs), and is attractive for routine and automated use (Neal, 2003). An adaptive version is AFSS. As a componentwise algorithm, Slice is slower per iteration than algorithms that use multivariate proposals. Multivariate slice samplers have been proposed, such as ESS, OHSS, and UESS. Since Slice is not an adaptive algorithm, it is acceptable as a final algorithm.

References

  • Besag J and Green PJ (1993). "Spatial Statistics and Bayesian Computation." Journal of the Royal Statistical Society, Series B, 55, 25-37.
  • Neal R (1997). "Markov Chain Monte Carlo Methods Based on Slicing the Density Function." Technical Report, University of Toronto.
  • Neal R (2003). "Slice Sampling (with Discussion)." Annals of Statistics, 31(3), 705-767.

Bookmark this page