# Bayesian VAR

**URL:** <https://forum.dynare.org/t/bayesian-var/2192>\
**Category:** Dynare help (legacy posts)\
**Created:** [12 October 2011 04:03 UTC](https://forum.dynare.org/t/bayesian-var/2192 "2011-10-12T04:03:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ztbhewitt](https://forum.dynare.org/letter_avatar_proxy/v4/letter/z/90ced4/32.png) [@ztbhewitt](https://forum.dynare.org/u/ztbhewitt)\
**Post date:** [12 October 2011 04:03 UTC](https://forum.dynare.org/t/bayesian-var/2192/1 "2011-10-12T04:03:54Z")

</div>

Hi everyone,  
I have a question about Bayesian VAR. Can dynare generate impluse response after implementing Bayesian VAR?

---

<div class="post-metadata">

**Author:** ![sebastien](https://forum.dynare.org/user_avatar/forum.dynare.org/sebastien/32/19973_2.png) [@sebastien](https://forum.dynare.org/u/sebastien)\
**Post date:** [27 October 2011 15:30 UTC](https://forum.dynare.org/t/bayesian-var/2192/2 "2011-10-27T15:30:12Z")

</div>

This is not implemented. But it is not too difficult to do by yourself.

Best,

---

<div class="post-metadata">

**Author:** ![stepan-a](https://forum.dynare.org/user_avatar/forum.dynare.org/stepan-a/32/6652_2.png) [@stepan-a](https://forum.dynare.org/u/stepan-a)\
**Post date:** [14 November 2011 09:46 UTC](https://forum.dynare.org/t/bayesian-var/2192/3 "2011-11-14T09:46:56Z")

</div>

Actually it is implemented but undocumented. There is a matlab (in dynare) routine called bvar\_irf.m which can be called in the mod file (after the estimation command). The routine admits two inputs: the number of lags (any positive integer) and optionally the identification scheme:

[ol]  
_] Cholesky, this is the default./_:m]  
_] SquareRoot, using matlab’s sqrtm routine./_:m][/ol]

The advantage of the second approach is that it is independent of the ordering of the variables contrary to the first identification scheme (this advantage comes at the cost in terms of interpretation). The second argument has to be passed as a string. For instance:

```auto
bvar_irf(4,'SquareRoot');
```

---

<div class="post-metadata">

**Author:** ![cobleton](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/8dc957/32.png) [@cobleton](https://forum.dynare.org/u/cobleton)\
**Post date:** [14 December 2011 01:51 UTC](https://forum.dynare.org/t/bayesian-var/2192/4 "2011-12-14T01:51:33Z")

</div>

Dear Stephanie,

I had the same question than the OP. I saw the code bvar\_irf.m in my Dynare files, and I would like to double-check whether the IRF output comes with the confidence intervals. Also, what is the methodology used in the code (if there is error bands) to implement confidence intervals?

Thank you so much !
