Page 1 of 1
Bayesian SVAR using cvmodel and Wishart prior
Posted: Thu Apr 13, 2017 7:29 am
by TG81
Hi,
I want to use a Bayesian SVAR model with normal wishart prior. I try to bring in %%responses as I want to use the @mcprocessirf procedure. However, I get the following error message when I run the attached program:
## MAT2. Matrices with Dimensions 16 x 5 and 10 x 5 Involved in + Operation
The Error Occurred At Location 183, Line 10 of loop/block
I am not able to fix the problem, please help me with this.
Many thanks!
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Thu Apr 13, 2017 8:29 am
by TomDoan
The "This is the standard setup for MC integration of an OLS VAR" assumes that you've just done an ESTIMATE instruction. You've inserted the CVMODEL between the ESTIMATE and that, and that has reset some of the information used. Move the MC setup up above the CVMODEL.
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Mon Apr 17, 2017 8:05 am
by TG81
Dear Tom,
Thanks very much for the reply. Now after fixing the program as suggested by you (please see attached), I am getting the results. However, some of the impulse responses are looking very weird. There are possibly more errors which I am not able to see. Can you please help me with that?
TG
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Mon Apr 17, 2017 10:03 am
by TomDoan
I think if you take the NOPRINT off the CVMODEL inside the loop, you'll see that you aren't getting reliable estimates. That's a very large model for the small amount of data you have. Even though the model is exactly identified, you're often better off doing importance sample or MH on a model like that if it doesn't have a constructive factor. Whether you can tune one of those correctly when the covariance matrix isn't well-defined by the data is another question entirely.
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Tue Apr 18, 2017 7:26 am
by TG81
Thanks very much for the reply!
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Tue Apr 18, 2017 8:13 am
by TG81
Dear Tom,
I am getting sensible results for the current model using MH.
I ran the program, that is SVAR with Whishart prior (attached in my previous thread), on a monthly dataset of 20 years. Again the results show weird impulse responses especially for the variables appearing later in the model. Hence I was wondering if the problem is with the program rather than the data. The same dataset show good results using MH.
TG
Re: Bayesian SVAR using cvmodel and Wishart prior
Posted: Tue Apr 18, 2017 8:25 am
by TomDoan
That probably shows that you can't reliably fit the CVMODEL "blind", which makes it useless inside a simulation loop.