# Proposal Density for the Independent Metropolis Hastings

**URL:** <https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282>\
**Category:** Estimation\
**Created:** [26 February 2020 09:22 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282 "2020-02-26T09:22:19Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![BSchumann](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/bbce88/32.png) [@BSchumann](https://forum.dynare.org/u/BSchumann)\
**Post date:** [1 December 2020 11:08 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282/21 "2020-12-01T11:08:37Z")

</div>

Dear Prof. Pfeifer,

maybe as a follow up question. If I put a stoch\_simul after the estimation comand to compute IRFs, are those IRF computed at the posterior mode or mean?

Ben

---

<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 December 2020 11:12 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282/22 "2020-12-01T11:12:05Z")

</div>

That depends. From the manual:

> After running estimation, the parameters `M_.params` and the variance matrix `M_.Sigma_e` of the shocks are set to the mode for maximum likelihood estimation or posterior mode computation without Metropolis iterations. After estimation with Metropolis iterations (option `mh_replic > 0` or option `load_mh_file` set) the parameters `M_.params` and the variance matrix `M_.Sigma_e` of the shocks are set to the posterior mean

---

<div class="post-metadata">

**Author:** ![BSchumann](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/bbce88/32.png) [@BSchumann](https://forum.dynare.org/u/BSchumann)\
**Post date:** [1 December 2020 11:39 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282/23 "2020-12-01T11:39:46Z")

</div>

I see thanks a lot! I would like to use the posterior mode instead. I can simply load the parameters from the \_mh\_mode file and pass them to stoch\_simul I guess?

---

<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 December 2020 11:52 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282/24 "2020-12-01T11:52:57Z")

</div>

Use

```auto
xparam1 = get_posterior_parameters('mode',M_,estim_params_,oo_,options_);
M_ = set_all_parameters(xparam1,estim_params_,M_);

```

---

<div class="post-metadata">

**Author:** ![BSchumann](https://forum.dynare.org/letter_avatar_proxy/v4/letter/b/bbce88/32.png) [@BSchumann](https://forum.dynare.org/u/BSchumann)\
**Post date:** [1 December 2020 14:14 UTC](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282/25 "2020-12-01T14:14:20Z")

</div>

This is great! thanks a lot!

[Previous page](https://forum.dynare.org/t/proposal-density-for-the-independent-metropolis-hastings/15282.md?page=1)
