Ch. 3 stata
C1
(i)
はプラスの方向を示すだろう.
(ii)
収入が多い人は健康にも気を使う可能性があるので,相関があるにしてもマイナスだろう.
(iii)
reg bwght cigs Source | SS df MS Number of obs = 1388 -------------+------------------------------ F( 1, 1386) = 32.24 Model | 13060.4194 1 13060.4194 Prob > F = 0.0000 Residual | 561551.3 1386 405.159668 R-squared = 0.0227 -------------+------------------------------ Adj R-squared = 0.0220 Total | 574611.72 1387 414.283864 Root MSE = 20.129 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cigs | -.5137721 .0904909 -5.68 0.000 -.6912861 -.3362581 _cons | 119.7719 .5723407 209.27 0.000 118.6492 120.8946 ------------------------------------------------------------------------------ reg bwght cigs faminc Source | SS df MS Number of obs = 1388 -------------+------------------------------ F( 2, 1385) = 21.27 Model | 17126.2088 2 8563.10442 Prob > F = 0.0000 Residual | 557485.511 1385 402.516614 R-squared = 0.0298 -------------+------------------------------ Adj R-squared = 0.0284 Total | 574611.72 1387 414.283864 Root MSE = 20.063 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cigs | -.4634075 .0915768 -5.06 0.000 -.6430518 -.2837633 faminc | .0927647 .0291879 3.18 0.002 .0355075 .1500219 _cons | 116.9741 1.048984 111.51 0.000 114.9164 119.0319 ------------------------------------------------------------------------------
収入を含めても,たばこを吸うことの新生児の体重への効果はほぼ変化はない.
C2
(i)
reg pric sqrft bdrms Source | SS df MS Number of obs = 88 -------------+------------------------------ F( 2, 85) = 72.96 Model | 580009.152 2 290004.576 Prob > F = 0.0000 Residual | 337845.354 85 3974.65122 R-squared = 0.6319 -------------+------------------------------ Adj R-squared = 0.6233 Total | 917854.506 87 10550.0518 Root MSE = 63.045 ------------------------------------------------------------------------------ price | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- sqrft | .1284362 .0138245 9.29 0.000 .1009495 .1559229 bdrms | 15.19819 9.483517 1.60 0.113 -3.657582 34.05396 _cons | -19.315 31.04662 -0.62 0.536 -81.04399 42.414 ------------------------------------------------------------------------------
(ii)
一部屋ベッドルームが増えると,15200$のアップ.
(iii)
一部屋ベッドルームが増えて,140スクエアフィート増えると,33181$のアップ.
(iv)
63.2%
(v)
予測は,354.6(in thousand dollars).
(vi)
実際は,300(in thousand dollars)なので,残さは,43.05であり,十分には支払われていない.
C3
(i)
を推定する.
reg lsalary lsales lmktval Source | SS df MS Number of obs = 177 -------------+------------------------------ F( 2, 174) = 37.13 Model | 19.3365617 2 9.66828083 Prob > F = 0.0000 Residual | 45.3096514 174 .260400295 R-squared = 0.2991 -------------+------------------------------ Adj R-squared = 0.2911 Total | 64.6462131 176 .367308029 Root MSE = .51029 ------------------------------------------------------------------------------ lsalary | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lsales | .1621283 .0396703 4.09 0.000 .0838315 .2404252 lmktval | .106708 .050124 2.13 0.035 .0077787 .2056372 _cons | 4.620917 .2544083 18.16 0.000 4.118794 5.123041 ------------------------------------------------------------------------------
となる.
(ii)
sum sales mktval profits Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- sales | 177 3529.463 6088.654 29 51300 mktval | 177 3600.316 6442.276 387 45400 profits | 177 207.8305 404.4543 -463 2700
と書く場合,xは正の実数をとる必要がある.profitsは負をとるため,対数変換には向かない.
reg lsalary lsales lmktval profits Source | SS df MS Number of obs = 177 -------------+------------------------------ F( 3, 173) = 24.64 Model | 19.3509799 3 6.45032663 Prob > F = 0.0000 Residual | 45.2952332 173 .261822157 R-squared = 0.2993 -------------+------------------------------ Adj R-squared = 0.2872 Total | 64.6462131 176 .367308029 Root MSE = .51169 ------------------------------------------------------------------------------ lsalary | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lsales | .1613683 .0399101 4.04 0.000 .0825949 .2401416 lmktval | .0975286 .0636886 1.53 0.128 -.0281782 .2232354 profits | .0000357 .000152 0.23 0.815 -.0002643 .0003356 _cons | 4.686924 .3797294 12.34 0.000 3.937425 5.436423 ------------------------------------------------------------------------------
決定係数はそれほど高くない.
(iii)
reg lsalary lsales lmktval profits ceoten Source | SS df MS Number of obs = 177 -------------+------------------------------ F( 4, 172) = 20.08 Model | 20.5768102 4 5.14420254 Prob > F = 0.0000 Residual | 44.0694029 172 .256217459 R-squared = 0.3183 -------------+------------------------------ Adj R-squared = 0.3024 Total | 64.6462131 176 .367308029 Root MSE = .50618 ------------------------------------------------------------------------------ lsalary | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- lsales | .1622339 .0394826 4.11 0.000 .0843012 .2401667 lmktval | .1017598 .063033 1.61 0.108 -.022658 .2261775 profits | .0000291 .0001504 0.19 0.847 -.0002677 .0003258 ceoten | .0116847 .005342 2.19 0.030 .0011403 .022229 _cons | 4.55778 .3802548 11.99 0.000 3.807213 5.308347 ------------------------------------------------------------------------------
となる.
1年働くと,1.2%の収入増加となる.
(iv)
cor lmktval profits (obs=177) | lmktval profits -------------+------------------ lmktval | 1.0000 profits | 0.7769 1.0000
相関は高いが,vifは高くないので,それほど問題はない.
C4
(i)
sum atndrte priGPA ACT Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- atndrte | 680 81.70956 17.04699 6.25 100 priGPA | 680 2.586775 .5447141 .857 3.93 ACT | 680 22.51029 3.490768 13 32
81.7%のクラスに平均的に出席しており,前学期のGPAは平均2.59,ACTのスコアは平均22.51である.
それぞれの最小値・最大値は,6.25%と100%,.857と3.93,13と32である.
(ii)
を推定する.
reg atndrte priGPA ACT Source | SS df MS Number of obs = 680 -------------+------------------------------ F( 2, 677) = 138.65 Model | 57336.7612 2 28668.3806 Prob > F = 0.0000 Residual | 139980.564 677 206.765974 R-squared = 0.2906 -------------+------------------------------ Adj R-squared = 0.2885 Total | 197317.325 679 290.59989 Root MSE = 14.379 ------------------------------------------------------------------------------ atndrte | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- priGPA | 17.26059 1.083103 15.94 0.000 15.13395 19.38724 ACT | -1.716553 .169012 -10.16 0.000 -2.048404 -1.384702 _cons | 75.7004 3.884108 19.49 0.000 68.07406 83.32675 ------------------------------------------------------------------------------
である.
GPAが0,かつACTのスコアが0の学生は,平均的に75.7%の出席率となる.あまり意味のある数字ではない.
(iii)
GPAがよい学生は,そうでない学生と比べ,より出席する傾向にある.ACTのスコアが良いと,そうでない学生と比べ,出席しにくくなる.
少し不思議な結果である.よりテストでうまくできていた学生は,出席しなくてもうまくやれると思っているということを反映しているのかもしれない.
(iv)
となり,出席率100%を超えてしまう.実際にサンプルのなかにこの値をとるサンプルがある.
(v)
となり,差は25.86%程度となる.
C5