Model selection with AIC etc.

For questions regarding programming in the EViews programming language.

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

huseyinky
Posts: 18
Joined: Mon Apr 20, 2009 1:59 pm

Model selection with AIC etc.

Postby huseyinky » Thu Jan 14, 2010 9:37 am

Hi everybody. I have following problem;
I have estimated numbers of equaiton and try to find which one has lowest aic by following code
note: my equations are named as eq_0, eq_1.....eq_12

Code: Select all

for !k=0 to 11 for !lag=0 to 11 !mininfocrit=999999 if eq_!k.@aic<!mininfocrit then !bestlag=!k !mininfocrit=eq_!k.@aic endif next next show eq_{!bestlag}

but this procedure does not show me the right equaiton. I can find minimum aic correctly, as I write down show !mininfocrit it gives the right value.
For any help, thanks in advance.

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

Re: Model selection with AIC etc.

Postby EViews Gareth » Thu Jan 14, 2010 9:42 am

You probably don't want to be setting !mininfocrit=999999 inside your for loop.

huseyinky
Posts: 18
Joined: Mon Apr 20, 2009 1:59 pm

Re: Model selection with AIC etc.

Postby huseyinky » Thu Jan 14, 2010 10:04 am

Yes you are right. you are great.

Code: Select all

!mininfocrit=999999 for !k=0 to 12 if eq_!k.@aic<!mininfocrit then !mininfocrit=eq_!k.@aic !bestlag=!k endif next show eq_{!bestlag}
ıt works very well. thank you very much.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests