Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Victor Zammit" <vmz@go.net.mt> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Forecasting |
Date | Mon, 14 Nov 2011 15:09:15 +0100 |
* Dear Statalist,* Using auto.dta,I want to determine the rank of the relative predictive faculty of the following nine
* independent variables, ( price, headroom, trunk, weight, length, turn, displacement ,gear_ratio, foreign).
* All of the nine models are atatistically significant at 95% confidence,because in all
* cases,the t-value is above 2.00 standard deviations. Can anyone please advice me whether I am
* on the right path? Also,is it coincidental,that the R-squared ranking matches perfectly that of the
* and the absolute t-values ranking.What is the intuition ,of the very high correlation,.9954,between
* the R-squares and the respective absolute values of the t-values ? * Victor M Zammit version 11 capture program drop kusi program define kusi use auto,clear sort `1' reg mpg `1' predict a line a mpg `1',saving(a`2',replace) gen str12 variable = "`1'" gen r2 = e(r2) gen t_value = _b[`1']/_se[`1'] gen abs_val = t_value replace abs_val = t_value*-1 if t_value<0 keep t_value r2 variable abs_val keep in 1 save a`2',replace end kusi price 1 kusi headroom 2 kusi trunk 3 kusi weight 4 kusi length 5 kusi turn 6 kusi displacement 7 kusi gear_ratio 8 kusi foreign 9 graph combine a1.gph a2.gph a3.gph a4.gph a5.gph a6.gph a7.gph a8.gph a9.gph use a1,clear forvalues i = 2/9 { append using a`i'.dta } gen s = 1-r2 sort s drop s l correlate abs_val r2 * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/