# Bayesian irfs

**URL:** <https://forum.dynare.org/t/bayesian-irfs/4689>\
**Category:** Dynare help (legacy posts)\
**Created:** [13 May 2015 12:38 UTC](https://forum.dynare.org/t/bayesian-irfs/4689 "2015-05-13T12:38:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![draoul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@draoul](https://forum.dynare.org/u/draoul)\
**Post date:** [13 May 2015 12:38 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/1 "2015-05-13T12:38:15Z")

</div>

Hi all,

I have estimated a DSGE model. After estimation, I compute the bayesian irfs. However, in the graphs, there appear strange horizonal lines in addition to the irfs and the grey shaded areas are not plotted properly (see the .pdf file in the attatchment).

I am working with Matlab2015a and Dynare 4.4.3.

The strange thing is that when I run the code on my old machine with Matlab2012b, I do not have this problem. Might this be a problem with Matlab2015?

Thanks for your help in advance!

Best,

Raoul  
[birfs.pdf](https://forum.dynare.org/uploads/default/original/2X/f/f1ceea35aa388be4d3ce6c2ba957d968a1e353fe.pdf) (134 KB)

---

<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:** [13 May 2015 12:57 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/2 "2015-05-13T12:57:10Z")

</div>

See [[Confidence band of Bayesian IRF (SW2007)](https://forum.dynare.org/t/confidence-band-of-bayesian-irf-sw2007/4669/3))

---

<div class="post-metadata">

**Author:** ![draoul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@draoul](https://forum.dynare.org/u/draoul)\
**Post date:** [13 May 2015 13:20 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/3 "2015-05-13T13:20:30Z")

</div>

Dear Johannes,

Thanks a lot for your quick reply. Your solution worked out for me!

Many thanks!

Best,

Raoul

---

<div class="post-metadata">

**Author:** ![draoul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@draoul](https://forum.dynare.org/u/draoul)\
**Post date:** [15 June 2015 13:22 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/4 "2015-06-15T13:22:38Z")

</div>

Hi all,

I am experiencing the same bug when estimating a Bayesian VAR and computing IRFs using the command bvar\_irf() (see pdf in the attachment).

Is there also a fix for the bvar\_irf command similar to the fix available for the bayesian\_irf option (PosteriorIRF\_core2.m)?

Thanks a lot for your help in advance!

Best,

Raoul  
[bvar\_irfs.pdf](https://forum.dynare.org/uploads/default/original/2X/1/1db1de1ba451fd377b3ff4495c3c33e8358fe718.pdf) (7.13 KB)

---

<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:** [15 June 2015 14:43 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/5 "2015-06-15T14:43:37Z")

</div>

The attached file solves the issue.  
[bvar\_irf.m](https://forum.dynare.org/uploads/default/original/2X/5/59afaff6009ae66791fd978ad7f71e1e044693ca.m) (5.22 KB)

---

<div class="post-metadata">

**Author:** ![draoul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@draoul](https://forum.dynare.org/u/draoul)\
**Post date:** [15 June 2015 15:54 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/6 "2015-06-15T15:54:58Z")

</div>

Dear Johannes,

Thanks a lot for your fast reply.

This code solves the issue with the plotting.

Thanks again for your help! It is highly appreciated.

Best,

Raoul

---

<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:** [15 June 2015 17:28 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/7 "2015-06-15T17:28:42Z")

</div>

Dear Raoul,

I have updated the previous posts to reflect the mistake you pointed out (I erroneously based the bugfix on the unstable version instead of 4.4.3). It should now work with the attached file.

---

<div class="post-metadata">

**Author:** ![draoul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/278dde/32.png) [@draoul](https://forum.dynare.org/u/draoul)\
**Post date:** [15 June 2015 17:50 UTC](https://forum.dynare.org/t/bayesian-irfs/4689/8 "2015-06-15T17:50:30Z")

</div>

Okay, great!
