I have an implementation of the Griddy Gibbs sampler, but my observations on which I'm conditioning model parameters are too many in number, thus the likelihood underflows quickly, even with a log transformation. Sequential updating holds if one is using conjugate priors, since the posterior can be found analytically, but would this be the same with MCMC, and in particular my sampler? What I'm not sure about is the loss that comes from the candidate distribution, or approximating the full conditional, which is my case. Every chunk of observation is bound to have some error, and I'm not sure if chaining chunks of observations can be trusted.

In general, how can one implement a MCMC algorithm of this sort (non conjugate full conditionals for Gibbs) for say, tens of millions of observations from a model?


2 Answers 2


In this setting, MCMC is less appropriate than particle systems or sequential Monte Carlo, because you can use the previous particle system as an approximation to your prior (posterior for the earlier datapoints) and only use one observation at a time. Appropriate references for this are, e.g., Del Moral, Doucet, and Jasra (Journal of the Royal Statistical Society, Series B, 2006, 68, 411-436) and Andrieu, Doucet, and Hollenstein (Journal of the Royal Statistical Society, Series B, 2011, 72, 269-342).

  • $\begingroup$ Thanks, I'll certainly check out the references, but I could not understand this bit in your comment: "because you can use the previous particle system as an approximation to your prior (posterior for the earlier datapoints) and only use one observation at a time" Which method are you referring to with this statement? Anyway, I'll accept your answer. As an update: I've managed to transform the problematic steps of the approach to log space, which solved my problem. $\endgroup$
    – mahonya
    Nov 19, 2011 at 14:32
  • 1
    $\begingroup$ This is the particle MCMC method developed in the references provided in my answer. I cannot explain it in sufficient details on this forum, I am afraid. The overall principle is however to aim at a posterior based on $i$ observations at the $i$th step of the algorithm, using only the density of the $i$th observation in the update. See also Chopin (Biometrika, 2002, 89, 539-552). $\endgroup$
    – Xi'an
    Nov 21, 2011 at 7:26

Are you underflowing because you are not anywhere near reasonable parameter values? Perhaps you just need to find a good starting location. I otherwise don't see how you could underflow short of having 1e20 data points or parameters. You could use a small (but randomly sampled) portion of your data and to ML estimation and then use that as your starting point.

  • $\begingroup$ When doing direct sampling from posterior, for a grid based approximation, the joint likelihood of all observations become extremely small. The Griddy Gibbs sampler I've mentioned is an example of this. Even with good parameter values, just the joint probability is enough to underflow R for example. $\endgroup$
    – mahonya
    Oct 19, 2011 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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