Saving Coefficients from an estimated VAR (eviews 7)
Posted: Wed Feb 22, 2012 5:13 pm
Hi, I am running a few VAR and VEC models. I am trying to store the VAR estimated coefficients in a table defined earlier in the program. Tables are defined one at a time, however to save space the following loop gives the idea (probably could have just used to the loop but did not think of it when originally writing the code) ,
for !i = 1 to 3
table(741,25) var!i_coeff
next !i
When trying to store the estimated coefficients I get an error message saying that '.b' is used for vec not var. When I refer to the manuals it seems like .b(i,j) refers to the ith equation and jth regressor of a var. Any suggestions or guidance would be greatly appreciated, I have posted the peice of code I am using for estimating and saving the first 3 VAR coefficients.
if cdsv = 1 then
var var_est1_1.ls 1 1 s3 s9
freeze(roots_var_1_1) var_est1_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var1_coeff(1,1) = var_est_1_1.b(!z,!x)
next !x
next !z
var var_est2_1.ls 1 1 s3 s11
freeze(roots_var_2_1) var_est2_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var2_coeff(1,1) = var_est2_1.b(!z,!x)
next !x
next !z
var var_est3_1.ls 1 1 s3 s13
freeze(roots_var_3_1) var_est3_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var3_coeff(1,1) = var_est3_1.b(!z,!x)
next !x
next !z
endif
for !i = 1 to 3
table(741,25) var!i_coeff
next !i
When trying to store the estimated coefficients I get an error message saying that '.b' is used for vec not var. When I refer to the manuals it seems like .b(i,j) refers to the ith equation and jth regressor of a var. Any suggestions or guidance would be greatly appreciated, I have posted the peice of code I am using for estimating and saving the first 3 VAR coefficients.
if cdsv = 1 then
var var_est1_1.ls 1 1 s3 s9
freeze(roots_var_1_1) var_est1_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var1_coeff(1,1) = var_est_1_1.b(!z,!x)
next !x
next !z
var var_est2_1.ls 1 1 s3 s11
freeze(roots_var_2_1) var_est2_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var2_coeff(1,1) = var_est2_1.b(!z,!x)
next !x
next !z
var var_est3_1.ls 1 1 s3 s13
freeze(roots_var_3_1) var_est3_1.arroots
for !z = 1 to 2
for !x = 1 to 6
var3_coeff(1,1) = var_est3_1.b(!z,!x)
next !x
next !z
endif