------------------------------------------------------------------------------- log: d:\bill\fall2008\econ30331\state_cig_data_1.log log type: text opened on: 25 Sep 2008, 09:14:48 . . use state_cig_data . . . * generate real taxes . gen s_rtax=state_tax/cpi . gen f_rtax=federal_tax/cpi . gen s_f_rtax=s_rtax+f_rtax . . label var s_rtax "state real tax on cigs, cents/pack" . label var f_rtax "federal real tax on cigs, cents/pack" . label var s_f_rtax "state+federal real tax on cigs, cents/pack" . . . * construct new variables . . * time trend . gen trend=year-1981 . . * real per capita income . gen pcir=pci/cpi . . label var trend "=1 in 1st year, 2 in second, etc" . label var pcir "real per capita income" . . * run regression with tax, real income, trend and two taxes . * unrestricted model where both taxes enter . reg packs_pc trend pcir s_rtax f_rtax Source | SS df MS Number of obs = 1020 -------------+------------------------------ F( 4, 1015) = 214.43 Model | 373614.47 4 93403.6174 Prob > F = 0.0000 Residual | 442132.923 1015 435.598939 R-squared = 0.4580 -------------+------------------------------ Adj R-squared = 0.4559 Total | 815747.392 1019 800.537186 Root MSE = 20.871 ------------------------------------------------------------------------------ packs_pc | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- trend | -1.819112 .154649 -11.76 0.000 -2.12258 -1.515643 pcir | .0004883 .0001864 2.62 0.009 .0001226 .0008541 s_rtax | -.7979746 .0435066 -18.34 0.000 -.8833477 -.7126015 f_rtax | -.2996423 .1930018 -1.55 0.121 -.6783705 .0790858 _cons | 144.4113 5.477806 26.36 0.000 133.6622 155.1604 ------------------------------------------------------------------------------ . . *test the hypothesis that the coef is the same . test s_rtax=f_rtax ( 1) s_rtax - f_rtax = 0 F( 1, 1015) = 6.40 Prob > F = 0.0115 . . * do the f-test by brute force . * run the restricted model . reg packs_pc trend pcir s_f_rtax Source | SS df MS Number of obs = 1020 -------------+------------------------------ F( 3, 1016) = 282.26 Model | 370824.591 3 123608.197 Prob > F = 0.0000 Residual | 444922.802 1016 437.916143 R-squared = 0.4546 -------------+------------------------------ Adj R-squared = 0.4530 Total | 815747.392 1019 800.537186 Root MSE = 20.926 ------------------------------------------------------------------------------ packs_pc | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- trend | -1.619607 .1334016 -12.14 0.000 -1.881381 -1.357833 pcir | .0004559 .0001864 2.45 0.015 .0000901 .0008218 s_f_rtax | -.7760163 .0427458 -18.15 0.000 -.8598965 -.6921361 _cons | 154.4029 3.807324 40.55 0.000 146.9318 161.874 ------------------------------------------------------------------------------ . . end of do-file . log close log: d:\bill\fall2008\econ30331\state_cig_data_1.log log type: text closed on: 25 Sep 2008, 09:15:18 -------------------------------------------------------------------------------