Bayesian SVAR using cvmodel and Wishart prior
Bayesian SVAR using cvmodel and Wishart prior
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!
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!
- Attachments
-
- testtry.xls
- Data
- (35.5 KiB) Downloaded 663 times
-
- Codes April 13.txt
- Program
- (2.69 KiB) Downloaded 847 times
Re: Bayesian SVAR using cvmodel and Wishart prior
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
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
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
- Attachments
-
- Codes April 17.txt
- Program
- (2.69 KiB) Downloaded 832 times
Re: Bayesian SVAR using cvmodel and Wishart prior
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
Thanks very much for the reply!
Re: Bayesian SVAR using cvmodel and Wishart prior
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
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
That probably shows that you can't reliably fit the CVMODEL "blind", which makes it useless inside a simulation loop.