# Irfs after estimation of a DSGE model

**URL:** <https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031>\
**Category:** ML/Bayesian estimation\
**Created:** [29 November 2020 15:44 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031 "2020-11-29T15:44:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eisamabodian](https://forum.dynare.org/user_avatar/forum.dynare.org/eisamabodian/32/12023_2.png) [@eisamabodian](https://forum.dynare.org/u/eisamabodian)\
**Post date:** [29 November 2020 15:44 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/1 "2020-11-29T15:44:34Z")

</div>

Hi.  
After estimation of a DSGE model in dynare, we can obtain impulse response functions via bayesian\_irf option in estimation(…) command or we can use stoch\_simul(…) command after estimation(…) command to obtain impulse response functions. Bayesian impulse response functions are based on the posterior mean, but my main question is that is there any difference between them? between these two different ways for obtaining of the IRFs ?

---

<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 November 2020 10:24 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/2 "2020-11-30T10:24:53Z")

</div>

> [@Bayesian IRF](https://forum.dynare.org/t/bayesian-irf/1594/2):
>
> The mean of the the Bayesian IRFs is the mean of the distribution of the IRFs generated when parameters are drawn from the posterior distribution. When you run stoch\_simul after MCMC, the parameters of the model are set to their mean value in the posterior distribution. But an IRF is a nonlinear function of the parameters, therefore the mean of the IRF is not identical to the IRF for the mean value of the parameters Best Michel

---

<div class="post-metadata">

**Author:** ![eisamabodian](https://forum.dynare.org/user_avatar/forum.dynare.org/eisamabodian/32/12023_2.png) [@eisamabodian](https://forum.dynare.org/u/eisamabodian)\
**Post date:** [30 November 2020 11:55 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/3 "2020-11-30T11:55:06Z")

</div>

I did not understand well.Can you explain more about Bayesian IFRs difference between estimation(…) command and stoch\_simul(…) command after MCMC. these ifrs are similar but not identical.

---

<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 November 2020 12:10 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/4 "2020-11-30T12:10:39Z")

</div>

It’s about Jensen’s Inequality. Denote the IRF at parameter \theta\_i with IRF(\theta\_i) with N being the number of MCMC draws. Then

\frac{1}{N}\sum\_{i=1}^N IRF(\theta\_i)\neq IRF(\frac{1}{N}\sum\_{i=1}^N \theta\_i)  
The first object is the mean IRF generated by `estimation, while the second object is the IRF at the parameter mean generated by `stoch\_simul`.

---

<div class="post-metadata">

**Author:** ![eisamabodian](https://forum.dynare.org/user_avatar/forum.dynare.org/eisamabodian/32/12023_2.png) [@eisamabodian](https://forum.dynare.org/u/eisamabodian)\
**Post date:** [30 November 2020 12:30 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/5 "2020-11-30T12:30:54Z")

</div>

Thank you so much professor.  
When we want to obtain impulse response functions in a DSGE model after estimation, which of these irfs is better to report in our scientific article?

---

<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 November 2020 12:40 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/6 "2020-11-30T12:40:48Z")

</div>

There is no general answer. It’s a matter of preference. If you want to convey a measure of uncertainty, then you need to use the Bayesian ones.

---

<div class="post-metadata">

**Author:** ![eisamabodian](https://forum.dynare.org/user_avatar/forum.dynare.org/eisamabodian/32/12023_2.png) [@eisamabodian](https://forum.dynare.org/u/eisamabodian)\
**Post date:** [30 November 2020 13:02 UTC](https://forum.dynare.org/t/irfs-after-estimation-of-a-dsge-model/17031/7 "2020-11-30T13:02:38Z")

</div>

Thank you so much professor for your helpful comments.
