Bvar_a_la_sims query

Hi,

BVAR is Bayesian estimation, so the result of the estimation is not a point matrix for Phi, but a probability distribution over matrices (the so-called posterior distribution).

The parameters of this distribution are computed when one calls for example the “bvar_density” function, but they are not stored.

Here is a solution: after a call to “bvar_density”, run the following command:

[ny, nx, posterior, prior] = bvar_toolbox(nlags);

where “nlags” is the number of lags that you want for the BVAR.

Then the “posterior” variable will be a structure with the following fields:

  • df: degrees of freedom of the inverse-Wishart distribution/*:m]
  • S: matrix parameter for the inverse-Wishart distribution/*:m]
  • XXi: first component of the VCV of the matrix-normal distribution (the other one being drawn from the inverse-Wishart)/*:m]
  • PhiHat: mean of the matrix-normal distribution/*:m]

Also note that there is a bug in the BVAR code when only one lag is requested, see dynare.org/DynareWiki/KnownBugs . This bug has been fixed in the unstable snapshot and will be fixed in the next stable release.

Best,