------------------------------------------------------------------------------- log: d:\bill\fall2008\econ30331\kentucky.log log type: text opened on: 8 Nov 2008, 15:09:18 . . . * generate log duration . gen ldurat=ln(durat) . . * sort the data by highearn and afchnge . sort highearn afchnge . . * gets means of ldurat for . * 2x2 table . by highearn afchnge: sum ldurat ------------------------------------------------------------------------------- -> highearn = 0, afchnge = 0 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- ldurat | 1652 1.123241 1.227601 -1.386294 5.204007 ------------------------------------------------------------------------------- -> highearn = 0, afchnge = 1 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- ldurat | 1464 1.137382 1.273859 -1.386294 5.204007 ------------------------------------------------------------------------------- -> highearn = 1, afchnge = 0 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- ldurat | 1128 1.35583 1.254325 -1.386294 5.204007 ------------------------------------------------------------------------------- -> highearn = 1, afchnge = 1 Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- ldurat | 1103 1.599077 1.302141 -1.386294 5.204007 . . . * get the treatment effect . gen treat=highearn*afchnge . . * run difference in difference regression . reg ldurat highearn afchnge treat Source | SS df MS Number of obs = 5347 -------------+------------------------------ F( 3, 5343) = 39.58 Model | 188.983823 3 62.9946077 Prob > F = 0.0000 Residual | 8503.76169 5343 1.5915706 R-squared = 0.0217 -------------+------------------------------ Adj R-squared = 0.0212 Total | 8692.74552 5346 1.62602797 Root MSE = 1.2616 ------------------------------------------------------------------------------ ldurat | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- highearn | .2325891 .0487277 4.77 0.000 .1370629 .3281152 afchnge | .0141418 .0452831 0.31 0.755 -.0746316 .1029151 treat | .2291051 .0700319 3.27 0.001 .091814 .3663963 _cons | 1.123241 .031039 36.19 0.000 1.062391 1.18409 ------------------------------------------------------------------------------ . . . * get other covariate . gen lage=ln(age) . gen lprewage=ln(prewage) . gen high_x_lpre=highearn*lprewage . . xi i.industry i.injury i.industry _Iindustry_1-3 (naturally coded; _Iindustry_1 omitted) i.injury _Iinjury_1-8 (naturally coded; _Iinjury_1 omitted) . . * this next regression replicates the results in . * column (i) of table 6, page 336 . . reg ldurat highearn afchnge treat male married lage lprewage high_x_lpre _I* Source | SS df MS Number of obs = 5347 -------------+------------------------------ F( 17, 5329) = 16.09 Model | 424.366738 17 24.9627493 Prob > F = 0.0000 Residual | 8268.37878 5329 1.55158168 R-squared = 0.0488 -------------+------------------------------ Adj R-squared = 0.0458 Total | 8692.74552 5346 1.62602797 Root MSE = 1.2456 ------------------------------------------------------------------------------ ldurat | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- highearn | -1.522196 1.099035 -1.39 0.166 -3.676755 .6323633 afchnge | .0155081 .0447622 0.35 0.729 -.072244 .1032603 treat | .2146878 .0693106 3.10 0.002 .0788106 .350565 male | -.0722981 .046195 -1.57 0.118 -.1628593 .0182631 married | .0509362 .0409132 1.24 0.213 -.0292704 .1311427 lage | .2522586 .0522575 4.83 0.000 .1498124 .3547047 lprewage | .2582666 .1038422 2.49 0.013 .0546934 .4618397 high_x_lpre | .2318765 .187021 1.24 0.215 -.1347612 .5985142 _Iindustry_2 | .2488065 .0593033 4.20 0.000 .1325477 .3650652 _Iindustry_3 | .1725146 .0416086 4.15 0.000 .0909448 .2540844 _Iinjury_2 | .780188 .155637 5.01 0.000 .4750758 1.0853 _Iinjury_3 | .3478323 .0920231 3.78 0.000 .1674295 .5282352 _Iinjury_4 | .6341329 .1005691 6.31 0.000 .4369763 .8312895 _Iinjury_5 | .5009463 .0924541 5.42 0.000 .3196985 .6821942 _Iinjury_6 | .3952596 .0932006 4.24 0.000 .2125482 .5779711 _Iinjury_7 | .7892506 .2065032 3.82 0.000 .3844198 1.194081 _Iinjury_8 | .5108587 .1288234 3.97 0.000 .2583122 .7634052 _cons | -1.605611 .5647855 -2.84 0.004 -2.712822 -.4984007 ------------------------------------------------------------------------------ . . . end of do-file . log close log: d:\bill\fall2008\econ30331\kentucky.log log type: text closed on: 8 Nov 2008, 15:09:53 -------------------------------------------------------------------------------