Page 1 of 1

Model selection with AIC etc.

Posted: Thu Jan 14, 2010 9:37 am
by huseyinky
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.

Re: Model selection with AIC etc.

Posted: Thu Jan 14, 2010 9:42 am
by EViews Gareth
You probably don't want to be setting !mininfocrit=999999 inside your for loop.

Re: Model selection with AIC etc.

Posted: Thu Jan 14, 2010 10:04 am
by huseyinky
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.