Problem with MONTEZHA.PRC
Posted: Fri May 29, 2009 1:32 pm
The procedure MONTEZHA.PRC shows how to implement Zha's procedure for overidentified BVAR. Well the code seems to work pretty well when the number of variables is exactly 6. When I run the code with more than 6, e.g., 7 variables, I got the following error message:
## MAT2. Matrices with Dimensions 6 x 1 and 7 x 1 Involved in %DOT Operation
The Error Occurred At Location 0102
Line 5 of loop/block
After some time I figured out that the problem seems to be related to the "deltas". The original code shows the following:
dec vect deltas(6)
compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0||
ewise deltas(i)=%nobs-ncoef+(deltas(i)+3)
compute delta=3.5
When I change this piece of code to:
dec vect deltas(7)
compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0,0.0||
ewise deltas(i)=%nobs-ncoef+(deltas(i)+3)
compute delta=4
The code works. Although I understand that the number of deltas must be consistent with the number of variables (right?), I do not know what the numbers in
"compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0,0.0||" actually mean. Should the user define them? What's the intuition behind? Theory???
What are they? How should I choose the numbers? Why the sequence "4.0, 1.0, 3.0, 2.0,0.0,3.0" was chosen? For my specific problem (7 variables VAR) I randomly chosed the 7th number to be 0.0, but I have no idea how to pick a number for that.
Any help will be appreciated.
Thanks
## MAT2. Matrices with Dimensions 6 x 1 and 7 x 1 Involved in %DOT Operation
The Error Occurred At Location 0102
Line 5 of loop/block
After some time I figured out that the problem seems to be related to the "deltas". The original code shows the following:
dec vect deltas(6)
compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0||
ewise deltas(i)=%nobs-ncoef+(deltas(i)+3)
compute delta=3.5
When I change this piece of code to:
dec vect deltas(7)
compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0,0.0||
ewise deltas(i)=%nobs-ncoef+(deltas(i)+3)
compute delta=4
The code works. Although I understand that the number of deltas must be consistent with the number of variables (right?), I do not know what the numbers in
"compute deltas=||4.0,1.0,3.0,2.0,0.0,3.0,0.0||" actually mean. Should the user define them? What's the intuition behind? Theory???
What are they? How should I choose the numbers? Why the sequence "4.0, 1.0, 3.0, 2.0,0.0,3.0" was chosen? For my specific problem (7 variables VAR) I randomly chosed the 7th number to be 0.0, but I have no idea how to pick a number for that.
Any help will be appreciated.
Thanks