# Robust MCMC estimator of marginal likelihood?

I'm trying to compute the marginal likelihood for a statistical model by Monte Carlo methods:

$$f(x) = \int f(x\mid\theta) \pi(\theta)\, d\theta$$

The likelihood is well behaved - smooth, log-concave - but high-dimensional. I've tried importance sampling, but the results are wonky and depend highly on the proposal I'm using. I briefly considered doing Hamiltonian Monte Carlo to compute posterior samples assuming a uniform prior over $\theta$ and taking the harmonic mean, until I saw this. Lesson learned, the harmonic mean can have infinite variance. Is there an alternative MCMC estimator that is nearly as simple, but has a well-behaved variance?

• You could also consider basic monte carlo sampling from the prior. $f(x)=E_{\pi(\theta)}(f(x|\theta))$ – probabilityislogic May 28 '13 at 11:06
• That's one possible solution. In this case, remember that improper priors are no longer allowed, and priors with a very spread support will probably make the Monte Carlo approximation difficult. – Zen May 28 '13 at 18:33
• A complete book on the issue is Chen, Shao and Ibrahim (2001). You can also search for keywords like nested sampling, bridge sampling, defensive sampling, particle filters, Savage-Dickey. – Xi'an Sep 10 '16 at 9:13