Rozdział 9. Monte Carlo Markov Chains Library

Spis treści

Wstęp
The MarkovChain class
Description
MarkovChain object methods
MarkovChain static methods
Algorithms
The Metropolis algorithm
Metropolis-Hastings algorithm
Bayesian inference
Transition functions
Transition functions from distribution
Random walk transition function
Distributions
Sampling Distribution
Likelihood function
Helper distributions
Convergence Diagnostics and Output Analysis tool
Output Analysis
Diagnostics
References

Wstęp

The MCMC (Markov Chain Monte Carlo) methods are a class of algorithms for generating samples from probability distributions. The algorithms are based on the construction of Markov chains for which the stationary distribution is the required probability distribution.

A Markov chain starts with a randomly chosen initial state . After a large number of steps, sufficient for the initial state to be "forgotten", the remaining part of the chain is used as a sample from the required distribution. The initial, omitted part of the chain is called "burn-in". The quality of the sample increases with the number of steps made.

Usually it is not difficult to construct a Markov chain with the required properties. It is a lot more difficult to determine the number of steps necessary to obtain an approximation of the stationary distribution with an acceptable error.

A typical use of the MCMC sampling only approximates the given distribution. More sophisticated methods, such as coupling from the past, can generate an exact sample. However, these methods require additional computations and unlimited running time.

The most popular application of these algorithms is the numerical calculation of multidimensional integrals. At each point reached by the algorithm, the value of the integrand is calculated into the integral. Before proceeding, the algorithm can make a number of trial steps around the given area, seeking a spot which gives a sufficiently large contribution to the value of the integral.

Multidimensional integrals are frequently encountered in Bayesian statistics and computational physics. MCMC methods are widely applied in these fields.

The MCMC library provides the Metropolis and Metropolis-Hastings algorithms, as well as a selection of structures designed to assist in Bayesian inference. This in particular includes the construction of Bayesian logit models. It is also possible to construct other models, by implementing appropriate forms of the likelihood function.