next up previous contents
Next: Gibbs Sampling Up: Sampling from the Posterior Previous: Markov Chain Monte Carlo

 

Metropolis Hastings

The Metropolis-Hastings algorithm is a Markov chain Monte Carlo method as described previously. The algorithm sets about constructing a Markov matrix which has as its equilibrium distribution some target density tex2html_wrap_inline2431 , of interest to the operator. The algorithm requires the specification of a proposal density, tex2html_wrap_inline2461 , which is a probability density for j and may depend upon i. This is then used in order to propose transitions from i. The condition of detailed balance is then imposed in the following fashion.

Construct tex2html_wrap_inline2469 by imposing detailed balance, so that the matrix with entries given by tex2html_wrap_inline2471 is a Markov matrix. This is done as follows:

displaymath2451

Otherwise, assume (without loss of generality) that

displaymath2452

then setting tex2html_wrap_inline2473 , and constructing

displaymath2453

detailed balance holds.

Thus, by defining in general

displaymath2454

detailed balance is satisfied.

In order that what has been constructed is a Markov matrix which will generate a chain having tex2html_wrap_inline2431 as the invariant distribution, it remains to show that tex2html_wrap_inline2433 is indeed Markov. This imposes conditions on the form of q which is related in turn to tex2html_wrap_inline2431 . The conditions are as referred to before, aperiodicity and connectedness. These are indeed satisfied for quite a large family of densities [30], [54].

The algorithm then, works as follows;

  1. Set i = 0; Set N = some large value; Choose an initial state tex2html_wrap_inline2487 .
  2. Propose y from tex2html_wrap_inline2491 .
  3. Accept the proposal with probability tex2html_wrap_inline2493 .
  4. If accepted, set tex2html_wrap_inline2495 , else set tex2html_wrap_inline2497 .
  5. If i<N set i=i+1; and back to step 2.

Although theory demonstrates that a chain constructed using this algorithm has a limiting distribution which is the target distribution, the question of the rate at which the limiting distribution is attained is still open.

Note that the samples tex2html_wrap_inline2503 generated by the chain will depend upon the choice of tex2html_wrap_inline2487 and only when close to the limiting distribution are the samples to be considered as having come from the target distribution.

What size should N be, and for what minimum j should tex2html_wrap_inline2511 be considered as a sample from the target? A number of methods have been proposed in order to answer these questions. Diagnostic methods of Gelman and Rubin [18] and others are reviewed by Cowles and Carlin [11]. Murdoch and Green have developed methods of demonstrating convergence [35], but these methods are far less practical than the heuristic diagnostics described elsewhere. A review of methods to date including those of Murdoch and Green is provided by Brooks and Roberts [7].

The Metropolis-Hastings algorithm is valid for sampling from the tex2html_wrap_inline2513 , for tex2html_wrap_inline2515 , that is for a general vector, x. However, in practice it can be more natural to consider x as the combination of subvectors tex2html_wrap_inline2521 . It turns out [9] that a transition matrix for a chain which converges to the target tex2html_wrap_inline2513 may be constructed by considering matrices for a chain which samples from tex2html_wrap_inline2525 and tex2html_wrap_inline2527 .


next up previous contents
Next: Gibbs Sampling Up: Sampling from the Posterior Previous: Markov Chain Monte Carlo

Cathal Walsh
Sat Jan 22 17:09:53 GMT 2000