-------------------------------------------------------------------------------- log: /Users/baum/Desktop/To do/EC327_S2008/327fdfe.smcl log type: smcl opened on: 22 Jan 2008, 17:10:55
. use http://fmwww.bc.edu/cfb/boyan/udcl_irrc_3, clear
. keep if yeara>2004 (21755 observations deleted)
. xtset panel variable: firmid (unbalanced) time variable: yeara, 2005 to 2006
. * make into a balanced panel for these two years with complete data . qui reg data18 data128 data6 data12
. keep if e(sample) (231 observations deleted)
. bysort firmid: g ok = _N==2
. keep if ok (479 observations deleted)
. tab yeara
fiscal year | Freq. Percent Cum. ------------+----------------------------------- 2005 | 1,320 50.00 50.00 2006 | 1,320 50.00 100.00 ------------+----------------------------------- Total | 2,640 100.00
. * first difference estimation (ssc install xtivreg2) . xtivreg2 data18 data128 data6 data12 if ok, fd noconst
FIRST DIFFERENCES ESTIMATION ---------------------------- Number of groups = 1320 Obs per group: min = 1 avg = 1.0 max = 1
OLS estimation --------------
Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only
Number of obs = 1320 F( 3, 1317) = 186.12 Prob > F = 0.0000 Total (centered) SS = 525542940.1 Centered R2 = 0.2903 Total (uncentered) SS = 531141338.7 Uncentered R2 = 0.2977 Residual SS = 373001157 Root MSE = 531.6
------------------------------------------------------------------------------ D.data18 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- data12 | D1. | .1330804 .0073978 17.99 0.000 .118581 .1475799 data6 | D1. | -.0081666 .0009866 -8.28 0.000 -.0101004 -.0062329 data128 | D1. | .2658948 .0556797 4.78 0.000 .1567645 .375025 ------------------------------------------------------------------------------ Included instruments: D.data12 D.data6 D.data128 ------------------------------------------------------------------------------
. * fixed effect estimation . xtreg data18 data128 data6 data12 if ok, fe
Fixed-effects (within) regression Number of obs = 2640 Group variable (i): firmid Number of groups = 1320
R-sq: within = 0.2977 Obs per group: min = 2 between = 0.4813 avg = 2.0 overall = 0.4735 max = 2
F(3,1317) = 186.12 corr(u_i, Xb) = -0.7398 Prob > F = 0.0000
------------------------------------------------------------------------------ data18 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- data128 | .2658948 .0557431 4.77 0.000 .1565398 .3752498 data6 | -.0081666 .0009877 -8.27 0.000 -.0101043 -.0062289 data12 | .1330804 .0074062 17.97 0.000 .1185511 .1476097 _cons | -381.0436 40.63884 -9.38 0.000 -460.7675 -301.3196 -------------+---------------------------------------------------------------- sigma_u | 1967.8384 sigma_e | 376.31125 rho | .96472092 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(1319, 1317) = 18.75 Prob > F = 0.0000
. . * repeat for three years . use http://fmwww.bc.edu/cfb/boyan/udcl_irrc_3, clear
. keep if yeara>2003 (19915 observations deleted)
. xtset panel variable: firmid (unbalanced) time variable: yeara, 2004 to 2006
. * make into a balanced panel for these two years with complete data . qui reg data18 data128 data6 data12
. keep if e(sample) (344 observations deleted)
. bysort firmid: g ok = _N==3
. keep if ok (889 observations deleted)
. tab yeara
fiscal year | Freq. Percent Cum. ------------+----------------------------------- 2004 | 1,319 33.33 33.33 2005 | 1,319 33.33 66.67 2006 | 1,319 33.33 100.00 ------------+----------------------------------- Total | 3,957 100.00
. * first difference estimation (ssc install xtivreg2) . xtivreg2 data18 data128 data6 data12 if ok, fd noconst
FIRST DIFFERENCES ESTIMATION ---------------------------- Number of groups = 1319 Obs per group: min = 2 avg = 2.0 max = 2
OLS estimation --------------
Estimates efficient for homoskedasticity only Statistics consistent for homoskedasticity only
Number of obs = 2638 F( 3, 2635) = 350.91 Prob > F = 0.0000 Total (centered) SS = 1033457052 Centered R2 = 0.2772 Total (uncentered) SS = 1045356767 Uncentered R2 = 0.2855 Residual SS = 746942589.9 Root MSE = 532.1
------------------------------------------------------------------------------ D.data18 | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- data12 | D1. | .1224888 .00452 27.10 0.000 .1136297 .1313478 data6 | D1. | -.0072491 .000863 -8.40 0.000 -.0089405 -.0055577 data128 | D1. | .0732101 .0457331 1.60 0.109 -.0164251 .1628452 ------------------------------------------------------------------------------ Included instruments: D.data12 D.data6 D.data128 ------------------------------------------------------------------------------
. * fixed effect estimation . xtreg data18 data128 data6 data12 if ok, fe
Fixed-effects (within) regression Number of obs = 3957 Group variable (i): firmid Number of groups = 1319
R-sq: within = 0.3223 Obs per group: min = 3 between = 0.5826 avg = 3.0 overall = 0.5650 max = 3
F(3,2635) = 417.72 corr(u_i, Xb) = -0.5965 Prob > F = 0.0000
------------------------------------------------------------------------------ data18 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- data128 | .0983172 .0415973 2.36 0.018 .0167506 .1798838 data6 | -.0006023 .0007978 -0.76 0.450 -.0021666 .000962 data12 | .1050727 .0042303 24.84 0.000 .0967776 .1133678 _cons | -238.4987 21.01925 -11.35 0.000 -279.7146 -197.2828 -------------+---------------------------------------------------------------- sigma_u | 1355.899 sigma_e | 415.58627 rho | .91412382 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(1318, 2635) = 17.90 Prob > F = 0.0000
. . log close log: /Users/baum/Desktop/To do/EC327_S2008/327fdfe.smcl log type: smcl closed on: 22 Jan 2008, 17:10:57 --------------------------------------------------------------------------------