Page 1 of 1
Find Highest Squared R
Posted: Sat Mar 27, 2010 1:45 pm
by arucard_esp
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.
Re: Find Highest Squared R
Posted: Sat Mar 27, 2010 1:51 pm
by EViews Gareth
Lookup "stepwise" regression in User Guide II, or the help system. It does exactly what you want.
Re: Find Highest Squared R
Posted: Sat Mar 27, 2010 2:22 pm
by startz
While Gareth gives good advice, the best you can get is an approximation as there are too many combinations to try them all.
Re: Find Highest Squared R
Posted: Sat Mar 27, 2010 3:11 pm
by arucard_esp
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!
Re: Find Highest Squared R
Posted: Sat Mar 27, 2010 9:39 pm
by EViews Gareth
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.
Re: Find Highest Squared R
Posted: Sat Mar 27, 2010 10:33 pm
by startz
Oh, Gareth is right. I was way off. There are only about 10,000 regressions to be run.
Re: Find Highest Squared R
Posted: Sun Mar 28, 2010 4:11 am
by arucard_esp
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.
Re: Find Highest Squared R
Posted: Sun Mar 28, 2010 7:33 am
by EViews Gareth
Switch the method to "Stepwise" and ensure you have positive numbers in the stopping criteria. Then switch back to combinatorial.
Re: Find Highest Squared R
Posted: Sun Mar 28, 2010 10:17 am
by arucard_esp
Oh great thank you so much!! I finally managed to do it! :)
Re: Find Highest Squared R
Posted: Sun Mar 28, 2010 11:41 am
by startz
You might check to see if you need to include a constant term.
Re: Find Highest Squared R
Posted: Tue Mar 30, 2010 12:02 pm
by arucard_esp
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?
Re: Find Highest Squared R
Posted: Tue Mar 30, 2010 1:22 pm
by EViews Gareth
You have lots of NAs in your data. The stepwise procedure uses a common sample where all variables have no NAs.