Page 1 of 1

Save coefficient in VAR estimation

Posted: Mon Nov 15, 2010 11:34 am
by luckygift2002
Dear all,

I am trying to save the coefficient matrix after an VAR estimation but I could not. Can anyone tell me how to save this.

This is my code which is working but I do not know where to find the coefficient matrix:

for !i = 1 to 1000

var mvar{!i}.ls(noconst) 1 1 a{!i} b{!i} c{!i}

@coefmat

next

Any help would be much appreciated.

Thanks,
Jing

Re: Save coefficient in VAR estimation

Posted: Mon Nov 15, 2010 11:51 am
by EViews Gareth

Code: Select all

matrix mycoefs = mvar.@coefmat

Re: Save coefficient in VAR estimation

Posted: Mon Nov 15, 2010 12:15 pm
by luckygift2002
Thank you Gareth,
The code works well.

However, the mycoefs only shows the coefficients in the final VAR estimation since it overwrites the previous estimates.

I am wondering how to save these 9 coefficient individually as a vector.

I am new to programming, your help is very appreciated.

Thanks again,
Jing

Re: Save coefficient in VAR estimation

Posted: Mon Nov 15, 2010 12:22 pm
by EViews Gareth

Code: Select all

vector myvec = @vec(mvar.@coefmat)