------------------------------------------------------------------------------- BELOW IS THE STATA CODE I USED FOR THIS PROBLEM SET clear; log using ps4, replace t use c:/classes_ISU/2005_2006/econ571/all_datasets/401k summarize regress prate mrate clear use c:/classes_ISU/2005_2006/econ571/all_datasets/sleep75 summarize regress sleep totwrk log close ------------------------------------------------------------------------------- . summarize Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- prate | 1534 87.36291 16.71654 3 100 mrate | 1534 .7315124 .7795393 .01 4.91 totpart | 1534 1354.231 4629.265 50 58811 totelg | 1534 1628.535 5370.719 51 70429 age | 1534 13.18123 9.171114 4 51 -------------+-------------------------------------------------------- totemp | 1534 3568.495 11217.94 58 144387 sole | 1534 .4876141 .5000096 0 1 ltotemp | 1534 6.686034 1.453375 4.060443 11.88025 . regress prate mrate Source | SS df MS Number of obs = 1534 -------------+------------------------------ F( 1, 1532) = 123.68 Model | 32001.7271 1 32001.7271 Prob > F = 0.0000 Residual | 396383.812 1532 258.73617 R-squared = 0.0747 -------------+------------------------------ Adj R-squared = 0.0741 Total | 428385.539 1533 279.442622 Root MSE = 16.085 ------------------------------------------------------------------------------ prate | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mrate | 5.861079 .5270107 11.12 0.000 4.82734 6.894818 _cons | 83.07546 .5632844 147.48 0.000 81.97057 84.18035 ------------------------------------------------------------------------------ . clear . use c:/classes_ISU/2005_2006/econ571/all_datasets/sleep75 . summarize Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- age | 706 38.81586 11.34264 23 65 black | 706 .0495751 .2172193 0 1 case | 706 353.5 203.9489 1 706 clerical | 706 .1823309 .3354132 0 1 construc | 706 .0300751 .148366 0 1 -------------+-------------------------------------------------------- educ | 706 12.78045 2.784702 1 17 earns74 | 706 9767.705 9323.588 0 42500 gdhlth | 706 .8909348 .3119419 0 1 inlf | 706 .7535411 .4312544 0 1 leis1 | 706 4690.724 908.0496 1745 7417 -------------+-------------------------------------------------------- leis2 | 706 4573.996 907.0841 1677 7297 leis3 | 706 4518.785 903.4107 1677 7282 smsa | 706 .3994334 .4901292 0 1 lhrwage | 532 1.430977 .6310362 -1.049822 3.569814 lothinc | 706 6.228292 4.219718 0 10.65728 -------------+-------------------------------------------------------- male | 706 .5665722 .4958996 0 1 marr | 706 .8215297 .3831796 0 1 prot | 706 .6628895 .4730581 0 1 rlxall | 706 3438.295 520.4321 1380 6110 selfe | 706 .131728 .3384346 0 1 -------------+-------------------------------------------------------- sleep | 706 3266.356 444.4134 755 4695 slpnaps | 706 3383.084 499.0469 1335 6110 south | 706 .184136 .3878698 0 1 spsepay | 706 5144.178 8246.899 0 75000 spwrk75 | 706 .48017 .4999608 0 1 -------------+-------------------------------------------------------- totwrk | 706 2122.921 947.4701 0 6415 union | 706 .2181303 .4132692 0 1 worknrm | 706 2093.252 945.3015 0 6415 workscnd | 706 29.66856 148.8343 0 1337 exper | 706 20.03541 12.37752 0 55 -------------+-------------------------------------------------------- yngkid | 706 .1288952 .3353215 0 1 yrsmarr | 706 11.76912 11.59123 0 43 hrwage | 532 5.082839 3.704385 .3500001 35.50999 agesq | 706 1635.144 950.103 529 4225 . regress sleep totwrk Source | SS df MS Number of obs = 706 -------------+------------------------------ F( 1, 704) = 81.09 Model | 14381717.2 1 14381717.2 Prob > F = 0.0000 Residual | 124858119 704 177355.282 R-squared = 0.1033 -------------+------------------------------ Adj R-squared = 0.1020 Total | 139239836 705 197503.313 Root MSE = 421.14 ------------------------------------------------------------------------------ sleep | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- totwrk | -.1507458 .0167403 -9.00 0.000 -.1836126 -.117879 _cons | 3586.377 38.91243 92.17 0.000 3509.979 3662.775 ------------------------------------------------------------------------------ . log close log: c:\temp_class\ps4.log log type: text closed on: 4 Jan 2006, 11:50:48 -------------------------------------------------------------------------------