Save coefficient in VAR estimation

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

luckygift2002
Posts: 7
Joined: Mon Feb 22, 2010 2:21 pm

Save coefficient in VAR estimation

Postby luckygift2002 » Mon Nov 15, 2010 11:34 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Save coefficient in VAR estimation

Postby EViews Gareth » Mon Nov 15, 2010 11:51 am

Code: Select all

matrix mycoefs = mvar.@coefmat

luckygift2002
Posts: 7
Joined: Mon Feb 22, 2010 2:21 pm

Re: Save coefficient in VAR estimation

Postby luckygift2002 » Mon Nov 15, 2010 12:15 pm

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Save coefficient in VAR estimation

Postby EViews Gareth » Mon Nov 15, 2010 12:22 pm

Code: Select all

vector myvec = @vec(mvar.@coefmat)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests