28
$\begingroup$

What is your preferred method of checking for convergence when using Markov chain Monte Carlo for Bayesian inference, and why?

$\endgroup$
20
$\begingroup$

I use the Gelman-Rubin convergence diagnostic as well. A potential problem with Gelman-Rubin is that it may mis-diagnose convergence if the shrink factor happens to be close to 1 by chance, in which case you can use a Gelman-Rubin-Brooks plot. See the "General Methods for Monitoring Convergence of Iterative Simulations" paper for details. This is supported in the coda package in R (for "Output analysis and diagnostics for Markov Chain Monte Carlo simulations"). coda also includes other functions (such as the Geweke’s convergence diagnostic).

You can also have a look at "boa: An R Package for MCMC Output Convergence Assessment and Posterior Inference".

$\endgroup$
9
$\begingroup$

Rather than using the Gelman-Rubin statistic, which is a nice aid but not perfect (as with all convergence diagnostics), I simply use the same idea and plot the results for a visual graphical assessment. In almost all cases I have considered (which is a very large number), graphing the trace plots of multiple MCMC chains started from widely varied starting positions is sufficient to show or assess whether the same posterior is being converged to or not, in each case. I use this method to:

  1. Whether the MCMC chain (ever) converges
  2. Assess how long I should set the burn-in period
  3. To calculate Gelman's R statistic (see Gelman, Carlin, Stern and Rubin, Bayesian Data Analysis) to measure the efficiency and speed of mixing in the MCMC sampler.

Efficiency and convergence are slightly different issues: e.g. you can have convergence with very low efficiency (i.e. thus requiring long chains to converge). I have used this graphical method to successfully diagnose (and later correct) lack of convergence problems in specific and general situations.

$\endgroup$
5
$\begingroup$

This is a wee late into the debate, but we have a whole chapter in our 2007 book Introducing Monte Carlo Methods with R dealing with this issue. You can also download the CODA package from CRAN to this effect.

$\endgroup$
2
$\begingroup$

I like to do trace plots primarily and sometimes I use the Gelman-Rubin convergence diagnostic.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.