Problem with @MCVARDoDraws
Problem with @MCVARDoDraws
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
@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
Re: Problem with @MCVARDoDraws
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 Cholesky 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
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 Cholesky 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
Re: Problem with @MCVARDoDraws
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
Thanks in advance
Re: Problem with @MCVARDoDraws
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.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
Re: Problem with @MCVARDoDraws
Problem solved. Thaks!!