Find Highest Squared R

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

arucard_esp
Posts: 5
Joined: Sat Mar 27, 2010 1:24 pm

Find Highest Squared R

Postby arucard_esp » Sat Mar 27, 2010 1:45 pm

Hello everyone,

I'm quite new with Eviews. I want to estimate an equation like this:
Lgcapita=B1(growth) + B2(variable A) + B3(variable B) +B4(variable C)
And in my workfile I got more or less 40 different social-economic variables.

Now I would like to ask if it's possible to say to Eviews to find me the best three variables of those 40 I got which explains the model the best.

Thanks in advance,

Best regards.

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

Re: Find Highest Squared R

Postby EViews Gareth » Sat Mar 27, 2010 1:51 pm

Lookup "stepwise" regression in User Guide II, or the help system. It does exactly what you want.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Find Highest Squared R

Postby startz » Sat Mar 27, 2010 2:22 pm

While Gareth gives good advice, the best you can get is an approximation as there are too many combinations to try them all.

arucard_esp
Posts: 5
Joined: Sat Mar 27, 2010 1:24 pm

Re: Find Highest Squared R

Postby arucard_esp » Sat Mar 27, 2010 3:11 pm

Thanks for the fast replies!

I directly checked the manual, and tried to do it, but i got some error:
"Tolerances muest be non negative"

So I'm sorry to bother you againy... it's not really field...

I selected Method STEPLS, afterwards in the first specification window i wrote down: Lgcapita growth. And in the second window al the names of the 40 regressors.
Later in the options screen: I selected Swapwise method: Max R-squared and stopping criteria: 3 regressors. I also tried other methods but i got the same error.

Like startz said, i did try to guess the three best variables, and i got an Rsquared of 0.82 but don't know if there would be any other possibility thats why i want to run this test....

Thank you again, and sorry!
Attachments
convergencia.wf1
(64.93 KiB) Downloaded 287 times

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

Re: Find Highest Squared R

Postby EViews Gareth » Sat Mar 27, 2010 9:39 pm

Choose Combinatorial, with 3 variables.

That will perform every possible combination of 3 variables out of the 40 and choose the one with the highest R-squared. Although Startz is right, in that it will perform a lot of different regressions, it took less than a 10th of a second on my pc.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Find Highest Squared R

Postby startz » Sat Mar 27, 2010 10:33 pm

Oh, Gareth is right. I was way off. There are only about 10,000 regressions to be run.

arucard_esp
Posts: 5
Joined: Sat Mar 27, 2010 1:24 pm

Re: Find Highest Squared R

Postby arucard_esp » Sun Mar 28, 2010 4:11 am

So, You were able to do it? Could I ask you how?

I still got Tolerances must be non negative.... what i'm doing worng??

I will attach the image with my selected options.
Attachments
what's wrong.PNG
what's wrong.PNG (76.06 KiB) Viewed 8922 times

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

Re: Find Highest Squared R

Postby EViews Gareth » Sun Mar 28, 2010 7:33 am

Switch the method to "Stepwise" and ensure you have positive numbers in the stopping criteria. Then switch back to combinatorial.

arucard_esp
Posts: 5
Joined: Sat Mar 27, 2010 1:24 pm

Re: Find Highest Squared R

Postby arucard_esp » Sun Mar 28, 2010 10:17 am

Oh great thank you so much!! I finally managed to do it! :)

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: Find Highest Squared R

Postby startz » Sun Mar 28, 2010 11:41 am

You might check to see if you need to include a constant term.

arucard_esp
Posts: 5
Joined: Sat Mar 27, 2010 1:24 pm

Re: Find Highest Squared R

Postby arucard_esp » Tue Mar 30, 2010 12:02 pm

You might check to see if you need to include a constant term.
Thanks for reminding startz, actually i specified wrong the model it has to be growth= c + B1(Lgcapita) + B2(variable A) + B3(variable B) +B4(variable C).....

And the stepwise gives me var2, var 35 and var18 (r2=0,623255), but there are other combination for example (var 2, 27, 4) which give me higher R2.. Why?

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

Re: Find Highest Squared R

Postby EViews Gareth » Tue Mar 30, 2010 1:22 pm

You have lots of NAs in your data. The stepwise procedure uses a common sample where all variables have no NAs.


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests