# Bayesian IRF and intervals

**URL:** <https://forum.dynare.org/t/bayesian-irf-and-intervals/12825>\
**Category:** ML/Bayesian estimation\
**Created:** [20 November 2018 16:03 UTC](https://forum.dynare.org/t/bayesian-irf-and-intervals/12825 "2018-11-20T16:03:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![apple564](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/b2d939/32.png) [@apple564](https://forum.dynare.org/u/apple564)\
**Post date:** [20 November 2018 16:03 UTC](https://forum.dynare.org/t/bayesian-irf-and-intervals/12825/1 "2018-11-20T16:03:16Z")

</div>

Dear Professor,  
I have some difficulty in understanding the Bayesian IRFs and intervals, see Figure 10 in the following page.

> **[Pfeifer\_2014\_Dynare\_graphs.pdf](https://bbcb79fe-a-62cb3a1a-s-sites.googlegroups.com/site/pfeiferecon/Pfeifer_2014_Dynare_graphs.pdf?attachauth=ANoY7cqHqrE7IBlQaWd12I2HM044GDLWg70udiEXvwVfPM27Nd0jdBHpv4z1k6ghLVHmfZ7bi0VYpCg_ug72oUbgB8k9_y2AGOzPhd6ltDRyHPhxW--YJpurn3D1C7Oajntk0GegoKfYAPvGTm-sLCTDdBXG2HR5hEPXVw2_PL2qgePRwd_2JPJ4E52kf6HYAd_P8EMAPE1cZBCXWbiFgw5sFHXp_hW5Q4X9qLorRmabD_NZgkprjR8%3D&attredirects=1)**
>
> 1001.86 KB

Can you please confirm if I understand it correctly?  
For the Bayesian IRF, it should be obtained by randomly drawing posterior. Each draw corresponds to one set of IRFs. Suppose if you have 1000 draws, I can work out the mean of the IRF. If I sort the IRFs, I should be able to get 5% and 95% intervals.  
I also read Leeper, et. al. (2010). It seems they plot IRFs at the mean estimates of the posterior, which is different from my previous understanding. So I am bit confused. Can you please clarify which case is Dynare doing?

Lisa

---

<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:** [20 November 2018 16:37 UTC](https://forum.dynare.org/t/bayesian-irf-and-intervals/12825/2 "2018-11-20T16:37:00Z")

</div>

You can do both in Dynare.

1. Bayesian IRFs triggered by `bayesian_irf` option of `estimation` are the respective quantiles over the IRFs using parameter draws from the posterior distribution.
2. The IRFs at the posterior mean would be generated when you run `stoch_simul` after `estimation`.
