# Different mode computation with different result

**URL:** <https://forum.dynare.org/t/different-mode-computation-with-different-result/4254>\
**Category:** Dynare help (legacy posts)\
**Created:** [30 October 2014 14:24 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254 "2014-10-30T14:24:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [30 October 2014 14:24 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/1 "2014-10-30T14:24:18Z")

</div>

Dear Jpfeifer,

I use Bayesian to estimate some parameters of my model. However, when I use “mode\_compute=4” and “mode\_compute=5”, I get different results through variance decomposition, although the both mode computation command can get good convergence result and identification analysis. Which result should I trust? Does it mean that my model is not robust and may have some fundamental problems?

Regards,

---

<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:** [30 October 2014 16:49 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/2 "2014-10-30T16:49:29Z")

</div>

It most probably means you did not get convergence to the same maximum/mode. Use the value of the posterior to see which mode was better.

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [31 October 2014 05:36 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/3 "2014-10-31T05:36:21Z")

</div>

Dear Jpfeifer,

Thanks for your answer. Could you explain a bit more in detail about how I can use the value of the posterior to check which mode was better? What is the criterion that mode is better?

Regards,

---

<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:** [31 October 2014 10:56 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/4 "2014-10-31T10:56:58Z")

</div>

The posterior is like the likelihood. The higher the better. After some mode-finders, Dynare is going to display the objective function at the mode. As the objective is minus the posterior, the lower the better.

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [31 October 2014 14:12 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/5 "2014-10-31T14:12:11Z")

</div>

Dear Jpfeifer,

Thanks for your explaination. I know that dynare can simulate the posterior distribution at the mode after some mode-finders. But I am still confused. Do you mean that I can compare the log data density? If not, how can I check which mode was better? I mean is there an explicit way to check?

---

<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:** [31 October 2014 19:20 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/6 "2014-10-31T19:20:20Z")

</div>

I am not talking about the log data density, but the posterior. If you are working with the unstable version, try using the file at [github.com/JohannesPfeifer/dynare/commit/edca875d2a815ba7f98d68c64adc7ef18b69aaaf](https://github.com/JohannesPfeifer/dynare/commit/edca875d2a815ba7f98d68c64adc7ef18b69aaaf)

---

<div class="post-metadata">

**Author:** ![Grant](https://forum.dynare.org/letter_avatar_proxy/v4/letter/g/a5b964/32.png) [@Grant](https://forum.dynare.org/u/Grant)\
**Post date:** [1 November 2014 04:04 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/7 "2014-11-01T04:04:33Z")

</div>

Dear Jpfeifer,

I am not using the unstable version but the stable version 4.4.3. Do you mean than I can compare the value of “Objective function at mode” shown in the log file? However, I cannot find the corresponding value when I use “mode\_compute=6”. When I use “mode\_compute=6”, I can only find “Final value of the log posterior (or the likelihood)”. Hope to receive your help. Thanks!

Regards,

---

<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:** [1 November 2014 11:24 UTC](https://forum.dynare.org/t/different-mode-computation-with-different-result/4254/8 "2014-11-01T11:24:12Z")

</div>

Those two things are the same. The objective function is minus the log-posterior. Note that mode\_compute=6 also displays MINUS the log posterior.
