-------------------------------------------------------------------------------- log: C:\Documents and Settings\Patricia_Anderson\My Documents\ECON 20\In > Class\sep30.log log type: text opened on: 30 Sep 2002, 11:13:24 . use vote1 . desc Contains data from vote1.dta obs: 173 vars: 10 13 Sep 2000 15:39 size: 5,190 (100.0% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- state str2 %9s state postal code district byte %9.0g congressional district democA byte %9.0g =1 if A is democrat voteA byte %9.0g percent vote for A expendA float %9.0g campaign expends. by A, $1000s expendB float %9.0g campaign expends. by B, $1000s prtystrA byte %9.0g % vote for president lexpendA float %9.0g log(expendA) lexpendB float %9.0g log(expendB) shareA float %9.0g 100*(expendA/(expendA+expendB)) ------------------------------------------------------------------------------- Sorted by: . reg voteA shareA Source | SS df MS Number of obs = 173 -------------+------------------------------ F( 1, 171) = 1017.70 Model | 41486.4749 1 41486.4749 Prob > F = 0.0000 Residual | 6970.77363 171 40.7647581 R-squared = 0.8561 -------------+------------------------------ Adj R-squared = 0.8553 Total | 48457.2486 172 281.728189 Root MSE = 6.3847 ------------------------------------------------------------------------------ voteA | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- shareA | .4638239 .0145393 31.90 0.000 .4351243 .4925234 _cons | 26.81254 .8871887 30.22 0.000 25.06129 28.56379 ------------------------------------------------------------------------------ . sum Variable | Obs Mean Std. Dev. Min Max -------------+----------------------------------------------------- state | 0 district | 173 8.83815 8.768823 1 42 democA | 173 .5549133 .498418 0 1 voteA | 173 50.50289 16.78476 16 84 expendA | 173 310.6111 280.9857 .3 1470.67 expendB | 173 305.0884 306.278 .93 1548.19 prtystrA | 173 49.75723 9.98365 22 71 lexpendA | 173 5.025556 1.601602 -1.197328 7.293476 lexpendB | 173 4.944369 1.571143 -.0725707 7.344844 shareA | 173 51.07618 33.48389 .09 99.5 . gen pctvoteA=voteA/100 . reg pctvoteA shareA Source | SS df MS Number of obs = 173 -------------+------------------------------ F( 1, 171) = 1017.70 Model | 4.14864752 1 4.14864752 Prob > F = 0.0000 Residual | .697077389 171 .004076476 R-squared = 0.8561 -------------+------------------------------ Adj R-squared = 0.8553 Total | 4.84572491 172 .028172819 Root MSE = .06385 ------------------------------------------------------------------------------ pctvoteA | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- shareA | .0046382 .0001454 31.90 0.000 .0043512 .0049252 _cons | .2681254 .0088719 30.22 0.000 .2506129 .2856379 ------------------------------------------------------------------------------ . gen pctA=shareA/100 . reg voteA pctA Source | SS df MS Number of obs = 173 -------------+------------------------------ F( 1, 171) = 1017.70 Model | 41486.4749 1 41486.4749 Prob > F = 0.0000 Residual | 6970.77367 171 40.7647583 R-squared = 0.8561 -------------+------------------------------ Adj R-squared = 0.8553 Total | 48457.2486 172 281.728189 Root MSE = 6.3847 ------------------------------------------------------------------------------ voteA | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- pctA | 46.38239 1.453926 31.90 0.000 43.51243 49.25234 _cons | 26.81254 .8871887 30.22 0.000 25.06129 28.56379 ------------------------------------------------------------------------------ . use wage1, clear . reg wage educ Source | SS df MS Number of obs = 526 -------------+------------------------------ F( 1, 524) = 103.36 Model | 1179.73204 1 1179.73204 Prob > F = 0.0000 Residual | 5980.68225 524 11.4135158 R-squared = 0.1648 -------------+------------------------------ Adj R-squared = 0.1632 Total | 7160.41429 525 13.6388844 Root MSE = 3.3784 ------------------------------------------------------------------------------ wage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .5413593 .053248 10.17 0.000 .4367534 .6459651 _cons | -.9048516 .6849678 -1.32 0.187 -2.250472 .4407687 ------------------------------------------------------------------------------ . **inflate to 2002 dollars . gen wage02=wage*3.18 . reg wage02 educ Source | SS df MS Number of obs = 526 -------------+------------------------------ F( 1, 524) = 103.36 Model | 11929.9223 1 11929.9223 Prob > F = 0.0000 Residual | 60479.051 524 115.418036 R-squared = 0.1648 -------------+------------------------------ Adj R-squared = 0.1632 Total | 72408.9733 525 137.921854 Root MSE = 10.743 ------------------------------------------------------------------------------ wage02 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | 1.721522 .1693288 10.17 0.000 1.388876 2.054169 _cons | -2.877428 2.178198 -1.32 0.187 -7.156501 1.401644 ------------------------------------------------------------------------------ . lwage educ unrecognized command: lwage r(199); . reg lwage educ Source | SS df MS Number of obs = 526 -------------+------------------------------ F( 1, 524) = 119.58 Model | 27.5606296 1 27.5606296 Prob > F = 0.0000 Residual | 120.769132 524 .230475443 R-squared = 0.1858 -------------+------------------------------ Adj R-squared = 0.1843 Total | 148.329762 525 .28253288 Root MSE = .48008 ------------------------------------------------------------------------------ lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .0827444 .0075667 10.94 0.000 .0678796 .0976092 _cons | .5837726 .0973358 6.00 0.000 .3925562 .774989 ------------------------------------------------------------------------------ . predict yhat (option xb assumed; fitted values) . graph yhat educ . gen wagehat=exp(yhat) . graph wagehat educ . gen lwage02=log(wage02) . reg lwage02 educ Source | SS df MS Number of obs = 526 -------------+------------------------------ F( 1, 524) = 119.58 Model | 27.5606281 1 27.5606281 Prob > F = 0.0000 Residual | 120.769117 524 .230475413 R-squared = 0.1858 -------------+------------------------------ Adj R-squared = 0.1843 Total | 148.329745 525 .282532847 Root MSE = .48008 ------------------------------------------------------------------------------ lwage02 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- educ | .0827444 .0075667 10.94 0.000 .0678796 .0976091 _cons | 1.740654 .0973358 17.88 0.000 1.549437 1.93187 ------------------------------------------------------------------------------ . use gpa2, clear . desc Contains data from gpa2.dta obs: 4,137 vars: 12 25 May 2002 14:39 size: 157,206 (99.9% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- sat int %10.0g combined SAT score tothrs int %10.0g total hours through fall semest colgpa float %9.0g GPA after fall semester athlete byte %8.0g =1 if athlete verbmath float %9.0g verbal/math SAT score hsize double %10.0g size grad. class, 100s hsrank int %10.0g rank in grad. class hsperc float %9.0g high school percentile, from top female byte %9.0g =1 if female white byte %9.0g =1 if white black byte %9.0g =1 if black hsizesq float %9.0g hsize^2 ------------------------------------------------------------------------------- Sorted by: . reg colgpa sat Source | SS df MS Number of obs = 4137 -------------+------------------------------ F( 1, 4135) = 829.26 Model | 299.712725 1 299.712725 Prob > F = 0.0000 Residual | 1494.48295 4135 .36142272 R-squared = 0.1670 -------------+------------------------------ Adj R-squared = 0.1668 Total | 1794.19567 4136 .433799728 Root MSE = .60118 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sat | .0019311 .0000671 28.80 0.000 .0017996 .0020625 _cons | .6630568 .0697213 9.51 0.000 .5263656 .7997479 ------------------------------------------------------------------------------ . **take a sample . sample 5 (3930 observations deleted) . reg colgpa sat Source | SS df MS Number of obs = 207 -------------+------------------------------ F( 1, 205) = 30.09 Model | 11.1134416 1 11.1134416 Prob > F = 0.0000 Residual | 75.7083132 205 .369308845 R-squared = 0.1280 -------------+------------------------------ Adj R-squared = 0.1237 Total | 86.8217548 206 .421464829 Root MSE = .60771 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sat | .0016552 .0003017 5.49 0.000 .0010603 .0022502 _cons | .9156009 .3129127 2.93 0.004 .2986613 1.532541 ------------------------------------------------------------------------------ . use gpa2, clear . sample 5 (3930 observations deleted) . reg colgpa sat Source | SS df MS Number of obs = 207 -------------+------------------------------ F( 1, 205) = 17.10 Model | 5.49775473 1 5.49775473 Prob > F = 0.0001 Residual | 65.9267879 205 .321594087 R-squared = 0.0770 -------------+------------------------------ Adj R-squared = 0.0725 Total | 71.4245426 206 .346721081 Root MSE = .56709 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sat | .0012461 .0003014 4.13 0.000 .0006519 .0018403 _cons | 1.340863 .3125896 4.29 0.000 .7245598 1.957165 ------------------------------------------------------------------------------ . use coeff, clear . sum Variable | Obs Mean Std. Dev. Min Max -------------+----------------------------------------------------- coeff | 30 .0019132 .0003615 .0012461 .0027464 . graph coeff . use gpa2 . reg colgpa sat Source | SS df MS Number of obs = 4137 -------------+------------------------------ F( 1, 4135) = 829.26 Model | 299.712725 1 299.712725 Prob > F = 0.0000 Residual | 1494.48295 4135 .36142272 R-squared = 0.1670 -------------+------------------------------ Adj R-squared = 0.1668 Total | 1794.19567 4136 .433799728 Root MSE = .60118 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sat | .0019311 .0000671 28.80 0.000 .0017996 .0020625 _cons | .6630568 .0697213 9.51 0.000 .5263656 .7997479 ------------------------------------------------------------------------------ . reg colgpa sat female Source | SS df MS Number of obs = 4137 -------------+------------------------------ F( 2, 4134) = 506.10 Model | 352.897728 2 176.448864 Prob > F = 0.0000 Residual | 1441.29795 4134 .348644883 R-squared = 0.1967 -------------+------------------------------ Adj R-squared = 0.1963 Total | 1794.19567 4136 .433799728 Root MSE = .59046 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sat | .0020576 .0000667 30.87 0.000 .0019269 .0021883 female | .2306707 .0186762 12.35 0.000 .1940552 .2672862 _cons | .4289542 .0710525 6.04 0.000 .2896532 .5682553 ------------------------------------------------------------------------------ . reg sat female Source | SS df MS Number of obs = 4137 -------------+------------------------------ F( 1, 4135) = 100.08 Model | 1899358.85 1 1899358.85 Prob > F = 0.0000 Residual | 78474487.5 4135 18978.1106 R-squared = 0.0236 -------------+------------------------------ Adj R-squared = 0.0234 Total | 80373846.3 4136 19432.7481 Root MSE = 137.76 ------------------------------------------------------------------------------ sat | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- female | -43.07331 4.305576 -10.00 0.000 -51.51456 -34.63207 _cons | 1049.697 2.886988 363.60 0.000 1044.037 1055.357 ------------------------------------------------------------------------------ . predict rhat, r . reg colgpa rhat Source | SS df MS Number of obs = 4137 -------------+------------------------------ F( 1, 4135) = 939.72 Model | 332.242616 1 332.242616 Prob > F = 0.0000 Residual | 1461.95306 4135 .353555758 R-squared = 0.1852 -------------+------------------------------ Adj R-squared = 0.1850 Total | 1794.19567 4136 .433799728 Root MSE = .59461 ------------------------------------------------------------------------------ colgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- rhat | .0020576 .0000671 30.65 0.000 .001926 .0021892 _cons | 2.652686 .0092446 286.95 0.000 2.634561 2.67081 ------------------------------------------------------------------------------ . use bwght, clear . reg bwght momeduc variable momeduc not found r(111); . reg bwght motheduc Source | SS df MS Number of obs = 1387 -------------+------------------------------ F( 1, 1385) = 6.65 Model | 2745.15468 1 2745.15468 Prob > F = 0.0100 Residual | 571729.586 1385 412.801145 R-squared = 0.0048 -------------+------------------------------ Adj R-squared = 0.0041 Total | 574474.741 1386 414.48394 Root MSE = 20.318 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- motheduc | .5921371 .2296198 2.58 0.010 .141697 1.042577 _cons | 111.0482 3.020007 36.77 0.000 105.1239 116.9725 ------------------------------------------------------------------------------ . reg bwght male Source | SS df MS Number of obs = 1388 -------------+------------------------------ F( 1, 1386) = 7.27 Model | 2998.87965 1 2998.87965 Prob > F = 0.0071 Residual | 571612.84 1386 412.419077 R-squared = 0.0052 -------------+------------------------------ Adj R-squared = 0.0045 Total | 574611.72 1387 414.283864 Root MSE = 20.308 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- male | 2.94235 1.091149 2.70 0.007 .8018674 5.082832 _cons | 117.1669 .7875145 148.78 0.000 115.6221 118.7118 ------------------------------------------------------------------------------ . reg bwght motheduc male Source | SS df MS Number of obs = 1387 -------------+------------------------------ F( 2, 1384) = 6.94 Model | 5702.29478 2 2851.14739 Prob > F = 0.0010 Residual | 568772.446 1384 410.96275 R-squared = 0.0099 -------------+------------------------------ Adj R-squared = 0.0085 Total | 574474.741 1386 414.48394 Root MSE = 20.272 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- motheduc | .5912437 .2291081 2.58 0.010 .141807 1.04068 male | 2.92295 1.089649 2.68 0.007 .7854078 5.060493 _cons | 109.5361 3.065546 35.73 0.000 103.5225 115.5497 ------------------------------------------------------------------------------ . gen junk=(_n<650) . reg bwght junk Source | SS df MS Number of obs = 1388 -------------+------------------------------ F( 1, 1386) = 1.57 Model | 650.268414 1 650.268414 Prob > F = 0.2104 Residual | 573961.451 1386 414.113601 R-squared = 0.0011 -------------+------------------------------ Adj R-squared = 0.0004 Total | 574611.72 1387 414.283864 Root MSE = 20.35 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- junk | -1.371818 1.094737 -1.25 0.210 -3.519339 .775703 _cons | 119.341 .7485788 159.42 0.000 117.8725 120.8095 ------------------------------------------------------------------------------ . reg bwght motheduc junk Source | SS df MS Number of obs = 1387 -------------+------------------------------ F( 2, 1384) = 4.07 Model | 3360.79186 2 1680.39593 Prob > F = 0.0172 Residual | 571113.949 1384 412.654588 R-squared = 0.0059 -------------+------------------------------ Adj R-squared = 0.0044 Total | 574474.741 1386 414.48394 Root MSE = 20.314 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- motheduc | .5901893 .2295845 2.57 0.010 .139818 1.040561 junk | -1.335369 1.093282 -1.22 0.222 -3.480039 .8093001 _cons | 111.6973 3.065876 36.43 0.000 105.683 117.7116 ------------------------------------------------------------------------------ . log close log: C:\Documents and Settings\Patricia_Anderson\My Documents\ECON 20\I > nClass\sep30.log log type: text closed on: 30 Sep 2002, 12:20:44 -------------------------------------------------------------------------------