bvar_a_la_sims query

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

bvar_a_la_sims query

Postby donihue » Mon Sep 12, 2011 1:23 pm

Hello,
Could someone tell me where (if ...) are stored the parameters in the matrix "phi" of the bottom of p.1 of the manual on "bvar_a_la_sims" (Y = X"phi" + U)? I would like to compare them to those obtained using the implementations in EViews and the MSBVAR package of R, which in principle should produce the same results ...
Many thanks
Donihue
donihue
 
Posts: 34
Joined: Mon Sep 12, 2011 1:12 pm

Re: bvar_a_la_sims query

Postby SébastienVillemot » Wed Sep 14, 2011 1:47 pm

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:
Code: Select all
[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
  • S: matrix parameter for the inverse-Wishart distribution
  • XXi: first component of the VCV of the matrix-normal distribution (the other one being drawn from the inverse-Wishart)
  • PhiHat: mean of the matrix-normal distribution

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

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 13 guests