# The log marginal data density in mode\_computer=6

**URL:** <https://forum.dynare.org/t/the-log-marginal-data-density-in-mode-computer-6/4898>\
**Category:** ML/Bayesian estimation\
**Created:** [11 August 2015 08:30 UTC](https://forum.dynare.org/t/the-log-marginal-data-density-in-mode-computer-6/4898 "2015-08-11T08:30:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [11 August 2015 09:13 UTC](https://forum.dynare.org/t/the-log-marginal-data-density-in-mode-computer-6/4898/2 "2015-08-11T09:13:25Z")

</div>

Both the Laplace approximation and the modified harmonic mean estimator are ways to compute the marginal data density. As computing the marginal data density involves solving a complicated integral, these two methods for tackling the issue have been proposed. In theory, they should yield identical results as they measure the same thing. In practice, both involve approximations and may yield differing results. It is hard to tell which one to prefer. Footnote 11 of Smets/Wouters (2007) states:

> [@](#):
>
> As discussed in John Geweke (1998), the Metropolis-Hastings-based sample of the posterior distribution can be used to evaluate the marginal likelihood of the model. Following Geweke (1998), we calculate the modified harmonic mean to evaluate the integral over the posterior sample. An alternative approximation is the Laplace approximation around the posterior mode, which is based on a normal distribution. In our experience, the results of both approximations are very close in the case of our estimated DSGE model. This is not too surprising, given the generally close correspondence between the histograms of the posterior sample and the normal distribution around the estimated mode for the individual parameters. Given the large advantage of the Laplace approximation in terms of computational costs, we will use this approximation for comparing alternative model specifications in the next section.

---

_[View the full topic](https://forum.dynare.org/t/the-log-marginal-data-density-in-mode-computer-6/4898)._
