------------------------------------------------------------------------------- log: d:\bill\fall2008\econ30331\gpa_example_1.log log type: text opened on: 9 Sep 2008, 20:54:36 . . * open gpa_example_1, 141 observations from . * college freshman . use gpa_example_1 . . * get means of key variables . sum college_gpa act hs_gpa Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- college_gpa | 141 3.056738 .3723103 2.2 4 act | 141 24.15603 2.844252 16 33 hs_gpa | 141 3.402128 .3199259 2.4 4 . . * get correlations between key variables . corr college_gpa act hs_gpa (obs=141) | colleg~a act hs_gpa -------------+--------------------------- college_gpa | 1.0000 act | 0.2068 1.0000 hs_gpa | 0.4146 0.3458 1.0000 . . *run regression with one variable . reg college_gpa act Source | SS df MS Number of obs = 141 -------------+------------------------------ F( 1, 139) = 6.21 Model | .829558811 1 .829558811 Prob > F = 0.0139 Residual | 18.5765406 139 .133644177 R-squared = 0.0427 -------------+------------------------------ Adj R-squared = 0.0359 Total | 19.4060994 140 .138614996 Root MSE = .36557 ------------------------------------------------------------------------------ college_gpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- act | .027064 .0108628 2.49 0.014 .0055862 .0485417 _cons | 2.402979 .2642027 9.10 0.000 1.880604 2.925355 ------------------------------------------------------------------------------ . . *run synthetic regression of hs_gpa on act . reg hs_gpa act Source | SS df MS Number of obs = 141 -------------+------------------------------ F( 1, 139) = 18.88 Model | 1.71352621 1 1.71352621 Prob > F = 0.0000 Residual | 12.615835 139 .090761403 R-squared = 0.1196 -------------+------------------------------ Adj R-squared = 0.1132 Total | 14.3293612 140 .10235258 Root MSE = .30127 ------------------------------------------------------------------------------ hs_gpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- act | .0388968 .008952 4.35 0.000 .0211971 .0565964 _cons | 2.462537 .2177273 11.31 0.000 2.032051 2.893022 ------------------------------------------------------------------------------ . . * run multivariate regression . reg college_gpa act hs_gpa Source | SS df MS Number of obs = 141 -------------+------------------------------ F( 2, 138) = 14.78 Model | 3.42365506 2 1.71182753 Prob > F = 0.0000 Residual | 15.9824444 138 .115814814 R-squared = 0.1764 -------------+------------------------------ Adj R-squared = 0.1645 Total | 19.4060994 140 .138614996 Root MSE = .34032 ------------------------------------------------------------------------------ college_gpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- act | .009426 .0107772 0.87 0.383 -.0118838 .0307358 hs_gpa | .4534559 .0958129 4.73 0.000 .2640047 .6429071 _cons | 1.286328 .3408221 3.77 0.000 .612419 1.960237 ------------------------------------------------------------------------------ . . * close log file . log close log: d:\bill\fall2008\econ30331\gpa_example_1.log log type: text closed on: 9 Sep 2008, 20:54:37 -------------------------------------------------------------------------------