# Estimation with mode\_compute only and model comparison

**URL:** <https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687>\
**Category:** ML/Bayesian estimation\
**Created:** [5 November 2024 11:04 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687 "2024-11-05T11:04:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gabrielr12](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@Gabrielr12](https://forum.dynare.org/u/Gabrielr12)\
**Post date:** [5 November 2024 11:04 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687/1 "2024-11-05T11:04:53Z")

</div>

Dear all, I would kindly ask two conceptual questions about estimation.

i) I use the estimation command with mode\_compute option to compute the mode with uniform priors for all parameters (large intervals). Then I use the mode results to simulate the model. From my perspective, this appears to be straight up equivalent to maximum likelihood estimation, right ?

ii) Let’s say I have 3 models M = 1, 2, 3 estimated by ML and with the respective likelihood p^M(y\_T / \theta\_M ), where \theta\_M is the estimated parameter vector obtained. I would like to choose only one model to work with. From the Bayesian point of view, we could choose based on marginal likelihood. But from the “ML” process above, since I do not have any complex priors, choosing the one with highest likelihood p^M(y\_T / \theta\_M ) is enough?

Thanks in advance !

---

<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:** [5 November 2024 12:34 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687/2 "2024-11-05T12:34:37Z")

</div>

1. Yes, that is equivalent to ML.
2. No, frequentist comparisons based on the likelihood are only valid for nested models (likelihood ratio tests). For non-nested models you have to use Bayesian model comparison using the marginal data density. Also note that implicit prior truncation due to e.g. Blanchard-Kahn violations may affect comparisons even for “simple” priors.

---

<div class="post-metadata">

**Author:** ![Gabrielr12](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@Gabrielr12](https://forum.dynare.org/u/Gabrielr12)\
**Post date:** [5 November 2024 13:09 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687/3 "2024-11-05T13:09:06Z")

</div>

Thanks for your response, professor.

I noticed that, accordingly to the manual, the output

_oo\_.MarginalDensity.LaplaceApproximation_

Is produced after the estimation command, even with _mh\_replic = 0_. It is enough to compare this statistic between the models?

---

<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:** [5 November 2024 13:25 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687/4 "2024-11-05T13:25:45Z")

</div>

See

> [@The log marginal data density in mode\_computer=6](https://forum.dynare.org/t/the-log-marginal-data-density-in-mode-computer-6/4898/2):
>
> 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:

---

<div class="post-metadata">

**Author:** ![Gabrielr12](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/e5b9ba/32.png) [@Gabrielr12](https://forum.dynare.org/u/Gabrielr12)\
**Post date:** [5 November 2024 13:36 UTC](https://forum.dynare.org/t/estimation-with-mode-compute-only-and-model-comparison/26687/5 "2024-11-05T13:36:30Z")

</div>

Perfect, so we do not need metropolis for the laplace approximation algorithm. I’ll work with that.

As always, many thanks for your availability Professor !
