Problem with @MCVARDoDraws

Questions and discussions on Vector Autoregressions

Problem with @MCVARDoDraws

Postby alvarezcc » Thu Aug 04, 2011 10:53 am

Hi! I tried to obtain confidence intervals for IRF's using this procedure but I get the following error:

@MCVARDoDraws(model= svar_92q3 ,STEPS=20,DRAWS=10000)
## MAT2. Matrices with Dimensions 36 x 5 and 13 x 5 Involved in + Operation
The Error Occurred At Location 0425 of MCVARDODRAWS
Line 50 of MCVARDODRAWS


I am using a factorization matrix obtained by CVMODEL from the estimation of a A-B model. Can anybody please explain me what I'm doing wrong and how to solve it.

Thanks in advance
alvarezcc
 
Posts: 19
Joined: Wed Mar 25, 2009 8:59 am

Re: Problem with @MCVARDoDraws

Postby moderator » Thu Aug 04, 2011 12:29 pm

The problem is probably with this line in the procedure

compute betadraw=betaols+betau

The error message suggests the dimensions of the two arrays (betaols and betau) don't match. Did you change the earlier line that computes betau, or that defines the FSIGMAD matrix used in that computation?

If so, that's probably not what you wanted to do. Change that code back to the way it was originally.

Instead, if you want to use your own factorization (such as one estimated using CVMODEL), the section of code you want to change is the following:

* The next line is where a particular factorization of sigmad is
* input into the calculation. This does the Choleski factorization in
* standard order, which is what is used above in drawing the
* coefficients.
*
compute factor=fsigmad

You can replace that COMPUTE with whatever code you need to compute the appropriate FACTOR matrix (for example, defining FACTOR as the output from the CVMODEL).

Regards,
Tom Maycock
moderator
Site Admin
 
Posts: 306
Joined: Thu Oct 19, 2006 4:33 pm

Re: Problem with @MCVARDoDraws

Postby alvarezcc » Thu Aug 04, 2011 1:00 pm

Hi! Thank you very much for your prompt response. I didn't change the compute betadraw.... line. I only changed the line you mention to use the factor matrix I calculated using cvmodel but I still keep receiving the same error mesage. Can you figure out what else could it be?

Thanks in advance
alvarezcc
 
Posts: 19
Joined: Wed Mar 25, 2009 8:59 am

Re: Problem with @MCVARDoDraws

Postby TomDoan » Thu Aug 04, 2011 1:38 pm

alvarezcc wrote:Hi! Thank you very much for your prompt response. I didn't change the compute betadraw.... line. I only changed the line you mention to use the factor matrix I calculated using cvmodel but I still keep receiving the same error mesage. Can you figure out what else could it be?

Thanks in advance


You're probably doing ESTIMATE for the VAR followed by CVMODEL. @MCVARDODRAWS assumes that the last estimation instruction before the procedure is the ESTIMATE for the VAR, as it pulls information out of the variables defined by that. Just re-do your ESTIMATE instruction after the CVMODEL.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: Problem with @MCVARDoDraws

Postby alvarezcc » Thu Aug 04, 2011 2:42 pm

Problem solved. Thaks!!
alvarezcc
 
Posts: 19
Joined: Wed Mar 25, 2009 8:59 am


Return to VARs (Vector Autoregression Models)

Who is online

Users browsing this forum: No registered users and 1 guest

cron