What would be a valid argument not to include firm fixed effects in a regression for a panel dataset?
-
Login or Register
- Log in with
. use "https://www.stata-press.com/data/r17/nlswork.dta" (National Longitudinal Survey of Young Women, 14-24 years old in 1968) . xtreg ln_wage i.year i.idcode if idcode<=3, fe note: 2.idcode omitted because of collinearity. note: 3.idcode omitted because of collinearity. Fixed-effects (within) regression Number of obs = 39 Group variable: idcode Number of groups = 3 R-squared: Obs per group: Within = 0.5446 min = 12 Between = 0.2670 avg = 13.0 Overall = 0.3678 max = 15 F(14,22) = 1.88 corr(u_i, Xb) = -0.0356 Prob > F = 0.0897 ------------------------------------------------------------------------------ ln_wage | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- year | 69 | .208967 .3918928 0.53 0.599 -.6037689 1.021703 70 | -.2747772 .3439816 -0.80 0.433 -.9881514 .4385969 71 | -.3613911 .326316 -1.11 0.280 -1.038129 .3153467 72 | -.2056973 .326316 -0.63 0.535 -.8824352 .4710406 73 | -.0310461 .326316 -0.10 0.925 -.707784 .6456917 75 | .0416271 .326316 0.13 0.900 -.6351107 .718365 77 | .0358937 .326316 0.11 0.913 -.6408441 .7126316 78 | .2433199 .326316 0.75 0.464 -.4334179 .9200578 80 | .2726139 .326316 0.84 0.412 -.4041239 .9493518 82 | .1747839 .3439816 0.51 0.616 -.5385903 .8881581 83 | .2924489 .326316 0.90 0.380 -.3842889 .9691868 85 | .3712589 .326316 1.14 0.267 -.305479 1.047997 87 | .2960361 .326316 0.91 0.374 -.3807017 .972774 88 | .3038639 .326316 0.93 0.362 -.3728739 .9806018 | idcode | 2 | 0 (omitted) 3 | 0 (omitted) | _cons | 1.659677 .2833366 5.86 0.000 1.072073 2.247281 -------------+---------------------------------------------------------------- sigma_u | .24956596 sigma_e | .27711004 rho | .44784468 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(2, 22) = 9.64 Prob > F = 0.0010 .
use "https://www.stata-press.com/data/r17/nlswork.dta" . xtreg ln_wage c.age##c.age i.year if idcode<=3, fe Fixed-effects (within) regression Number of obs = 39 Group variable: idcode Number of groups = 3 R-squared: Obs per group: Within = 0.7404 min = 12 Between = 0.4068 avg = 13.0 Overall = 0.4014 max = 15 F(16,20) = 3.57 corr(u_i, Xb) = -0.8560 Prob > F = 0.0042 ------------------------------------------------------------------------------ ln_wage | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- age | .0773019 .2865219 0.27 0.790 -.5203723 .6749761 | c.age#c.age | -.0045583 .0012212 -3.73 0.001 -.0071057 -.002011 | year | 69 | .3367906 .4335876 0.78 0.446 -.5676572 1.241238 70 | .2089384 .6771373 0.31 0.761 -1.203545 1.621422 71 | .3144116 .9610926 0.33 0.747 -1.690392 2.319216 72 | .5888124 1.253657 0.47 0.644 -2.02627 3.203894 73 | .8912873 1.550825 0.57 0.572 -2.343676 4.126251 75 | 1.246958 2.152898 0.58 0.569 -3.243908 5.737823 77 | 1.560689 2.761762 0.57 0.578 -4.200247 7.321624 78 | 1.941522 3.068213 0.63 0.534 -4.458659 8.341703 80 | 2.34498 3.684737 0.64 0.532 -5.341247 10.03121 82 | 2.698954 4.315145 0.63 0.539 -6.30228 11.70019 83 | 2.994437 4.618087 0.65 0.524 -6.638723 12.6276 85 | 3.538578 5.245889 0.67 0.508 -7.404154 14.48131 87 | 3.965153 5.878139 0.67 0.508 -8.296429 16.22674 88 | 4.40786 6.407149 0.69 0.499 -8.957218 17.77294 | _cons | 1.465543 5.342682 0.27 0.787 -9.679096 12.61018 -------------+---------------------------------------------------------------- sigma_u | .54258328 sigma_e | .21942548 rho | .85944136 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(2, 20) = 10.43 Prob > F = 0.0008 . reg ln_wage c.age##c.age i.year i.idcode if idcode<=3 Source | SS df MS Number of obs = 39 -------------+---------------------------------- F(18, 20) = 4.86 Model | 4.21278813 18 .234043785 Prob > F = 0.0005 Residual | .962950828 20 .048147541 R-squared = 0.8139 -------------+---------------------------------- Adj R-squared = 0.6465 Total | 5.17573896 38 .136203657 Root MSE = .21943 ------------------------------------------------------------------------------ ln_wage | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- age | .0773019 .2865219 0.27 0.790 -.5203723 .6749761 | c.age#c.age | -.0045583 .0012212 -3.73 0.001 -.0071057 -.002011 | year | 69 | .3367906 .4335876 0.78 0.446 -.5676572 1.241238 70 | .2089384 .6771373 0.31 0.761 -1.203545 1.621422 71 | .3144116 .9610926 0.33 0.747 -1.690392 2.319216 72 | .5888124 1.253657 0.47 0.644 -2.02627 3.203894 73 | .8912873 1.550825 0.57 0.572 -2.343676 4.126251 75 | 1.246958 2.152898 0.58 0.569 -3.243908 5.737823 77 | 1.560689 2.761762 0.57 0.578 -4.200247 7.321624 78 | 1.941522 3.068213 0.63 0.534 -4.458659 8.341703 80 | 2.34498 3.684737 0.64 0.532 -5.341247 10.03121 82 | 2.698954 4.315145 0.63 0.539 -6.30228 11.70019 83 | 2.994437 4.618087 0.65 0.524 -6.638723 12.6276 85 | 3.538578 5.245889 0.67 0.508 -7.404154 14.48131 87 | 3.965153 5.878139 0.67 0.508 -8.296429 16.22674 88 | 4.40786 6.407149 0.69 0.499 -8.957218 17.77294 | idcode | 2 | -.4183815 .0918256 -4.56 0.000 -.6099263 -.2268366 3 | .6579353 1.834332 0.36 0.724 -3.168414 4.484284 | _cons | 1.341224 4.651269 0.29 0.776 -8.361153 11.0436 ------------------------------------------------------------------------------ .
webuse nlswork, clear xtset idcode year xtreg ln_wage wks_work tenure i.year, fe testparm i.year reghdfe ln_wage wks_work tenure, absorb(idcode) local ll0= e(ll) reghdfe ln_wage wks_work tenure i.year, absorb(idcode year) local ll1= e(ll) qui levelsof year if e(sample), local(years) local Tminus1 = wordcount("`years'")-1 local LR= 2*(`ll1'-`ll0') display " LR chi2(`Tminus1') = `:di %4.2f `LR''; Prob > chi2 `:di %4.3f chi2tail(`Tminus1',`LR')'"
. testparm i.year ( 1) 69.year = 0 ( 2) 70.year = 0 ( 3) 71.year = 0 ( 4) 72.year = 0 ( 5) 73.year = 0 ( 6) 75.year = 0 ( 7) 77.year = 0 ( 8) 78.year = 0 ( 9) 80.year = 0 (10) 82.year = 0 (11) 83.year = 0 (12) 85.year = 0 (13) 87.year = 0 (14) 88.year = 0 F( 14, 22718) = 49.53 Prob > F = 0.0000 . . local LR= 2*(`ll1'-`ll0') . . display " LR chi2(`Tminus1') = `:di %4.2f `LR''; Prob > chi2 `:di %4.3f chi2tail(`Tminus1',`LR')'" LR chi2(14) = 807.01; Prob > chi2 0.000
Comment