Gibbs sampling step size - MathOverflow most recent 30 from http://mathoverflow.net 2013-06-20T09:18:24Z http://mathoverflow.net/feeds/question/91890 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/91890/gibbs-sampling-step-size Gibbs sampling step size s5s 2012-03-22T07:51:01Z 2012-03-24T20:13:01Z <p>I have some data generated using MCMC methods and in particular Gibbs sampling. I computed the autocorrelation but I'm unsure how to determine how many samples to skip.</p> <p>I'd like to determine that quantity from the autocorrelation function that I computed and not just use a "reasonable" value. Any documents to help me? Direct help is also welcome.</p> http://mathoverflow.net/questions/91890/gibbs-sampling-step-size/92065#92065 Answer by Louis Raes for Gibbs sampling step size Louis Raes 2012-03-24T08:11:58Z 2012-03-24T08:11:58Z <p>I assume you refer to the practice of "thinning"; e.g. only using every \$k\$th sample.</p> <p>This practice is often recommended in textbooks in order to deal with autocorrelation however it appears that using the entire chain (no thinning or skipping of samples) is nearly always better. The only reason to use this practice is because of memory management.</p> <p>I have seen a few papers discussing why we should not thin, a short one is:</p> <p>On thinning of chains in MCMC (2011), Link &amp; Eaton <a href="http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2011.00131.x/full" rel="nofollow">http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2011.00131.x/full</a></p> <p>(I hope I have not double posted this, it is my first time on MathOverflow.)</p> http://mathoverflow.net/questions/91890/gibbs-sampling-step-size/92102#92102 Answer by R Hahn for Gibbs sampling step size R Hahn 2012-03-24T20:13:01Z 2012-03-24T20:13:01Z <p>To expand a bit on Arthur B.'s comment that you can use samples even if they are dependent, consider this quote from Andrew Gelman and Kenneth Shirley:</p> <p><Blockquote> The purpose of thinning (i.e. setting n to some integer greater than 1) is computational, not statistical. If we have a model with 2000 parameters and we are running three chains with a million iterations each, we do not want to be carrying around 6 billion numbers in our simulation. The key is to realize that, if we really needed a million iterations, they must be so highly autocorrelated that little is gained by saving them all. In practice, we ﬁnd it is generally more than enough to save 1000 iterations in total, and so we thin accordingly. But ultimately this will depend on the size of the model and computational constraints. </Blockquote></p> <p>The <a href="http://www.stat.columbia.edu/~gelman/research/published/GelmanMCMCchapter4.pdf" rel="nofollow">full article</a> is full of great practical recommendations for using MCMC for inference. </p>