Dear Statalist community,
I would like to ask your expert wisdom help me find answers to 2 sets of questions related to xtreg fixed effects models.
Questions:
1.1. What are the reasons of F-stat and Prob>F not being shown in xtreg for FE in the following situations?
- FE clustered by industries --> (C)
- FE clustered by industries with year dummies --> (D)
- In all FE models with country variables (both FE clustered by industries or FE robust) --> (E - e.g. for robust model with year dummies)
- FE robust (no matter which combination of variables and disregarding the amount of moderating effects, but only if without country variables) --> (A)
- FE robust with year dummies (no matter which combination of variables and disregarding the amount of moderating effects, but only if without country variables) --> (B)
(A):
Code:
xtreg `DV' `Model`i'' `controls', fe vce (robust)
Code:
xtreg `DV' `Model`i'' `controls' i.fyear, fe vce (robust)
Code:
xtreg `DV' `Model`i'' `controls', fe vce (cluster sic_2)
Code:
xtreg `DV' `Model`i'' `controls' i.fyear, fe vce (cluster sic_2)
Code:
xtreg `DV' `Model`i'' `controls' `EXTRA' i.fyear, fe vce (robust)
Example of outputs:
Code:
(B) - Fixed effects, robust, with year dummies
Fixed-effects (within) regression Number of obs = 20,696
Group variable: gvkey Number of groups = 1,841
R-sq: Obs per group:
within = 0.0988 min = 1
between = 0.2326 avg = 11.2
overall = 0.1886 max = 20
F(28,1840) = 32.76
corr(u_i, Xb) = 0.0262 Prob > F = 0.0000
(Std. Err. adjusted for 1,841 clusters in gvkey)
----------------------------------------------------------------------------------------------------------------------
| Robust
tobinq2_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------------------------------------------+----------------------------------------------------------------
related_4sic_share | .0340085 .5733377 0.06 0.953 -1.090452 1.158469
|
c.related_4sic_share#c.related_4sic_share | -.2135236 .987496 -0.22 0.829 -2.150254 1.723207
|
mshare_w | .3829995 .1900017 2.02 0.044 .0103579 .755641
|
c.related_4sic_share#c.mshare_w | -.701038 1.599561 -0.44 0.661 -3.838184 2.436108
|
c.related_4sic_share#c.related_4sic_share#c.mshare_w | 2.234697 3.089436 0.72 0.470 -3.824472 8.293867
|
serv_share_w | -.0471057 .2441774 -0.19 0.847 -.5259996 .4317881
emp_ln | -.3214172 .0635477 -5.06 0.000 -.4460504 -.196784
rslack_w | -.2358683 .0335943 -7.02 0.000 -.3017553 -.1699813
roa_w | -.5590954 .1388514 -4.03 0.000 -.8314183 -.2867725
|
fyear |
2001 | -.3747645 .0590333 -6.35 0.000 -.4905437 -.2589852
2002 | -.9956165 .076589 -13.00 0.000 -1.145827 -.845406
2003 | -.3486831 .0793519 -4.39 0.000 -.5043124 -.1930538
2004 | -.3645786 .0809267 -4.51 0.000 -.5232965 -.2058607
2005 | -.447398 .0838688 -5.33 0.000 -.6118861 -.2829098
2006 | -.4301572 .0838413 -5.13 0.000 -.5945913 -.265723
2007 | -.5267527 .0871748 -6.04 0.000 -.6977247 -.3557807
2008 | -1.326023 .0887979 -14.93 0.000 -1.500178 -1.151868
2009 | -.9542163 .0869831 -10.97 0.000 -1.124812 -.7836204
2010 | -.7621579 .0898378 -8.48 0.000 -.9383526 -.5859632
2011 | -.9510688 .0912594 -10.42 0.000 -1.130052 -.772086
2012 | -.905346 .0921915 -9.82 0.000 -1.086157 -.724535
2013 | -.4279537 .0964689 -4.44 0.000 -.6171536 -.2387538
2014 | -.4560108 .0949477 -4.80 0.000 -.6422275 -.2697942
2015 | -.7080488 .0950795 -7.45 0.000 -.8945239 -.5215737
2016 | -.8275037 .0987554 -8.38 0.000 -1.021188 -.6338193
2017 | -.6002717 .1021271 -5.88 0.000 -.800569 -.3999745
2018 | -.9546988 .1000828 -9.54 0.000 -1.150987 -.7584109
2019 | -.778409 .1038597 -7.49 0.000 -.9821042 -.5747138
|
_cons | 3.329964 .117593 28.32 0.000 3.099334 3.560593
-----------------------------------------------------+----------------------------------------------------------------
sigma_u | 1.519513
sigma_e | 1.4080301
rho | .53802557 (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------------------------------
(E) - Fixed effects, robust, with year dummies, with industry control variable
Fixed-effects (within) regression Number of obs = 20,688
Group variable: gvkey Number of groups = 1,841
R-sq: Obs per group:
within = 0.0988 min = 1
between = 0.2328 avg = 11.2
overall = 0.1887 max = 20
F(28,1840) = .
corr(u_i, Xb) = 0.0262 Prob > F = .
(Std. Err. adjusted for 1,841 clusters in gvkey)
----------------------------------------------------------------------------------------------------------------------
| Robust
tobinq2_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------------------------------------------+----------------------------------------------------------------
related_4sic_share | .036094 .5733621 0.06 0.950 -1.088415 1.160603
|
c.related_4sic_share#c.related_4sic_share | -.2165501 .9879653 -0.22 0.827 -2.154201 1.721101
|
mshare_w | .3799196 .1896561 2.00 0.045 .0079559 .7518833
|
c.related_4sic_share#c.mshare_w | -.7269357 1.602988 -0.45 0.650 -3.870803 2.416931
|
c.related_4sic_share#c.related_4sic_share#c.mshare_w | 2.269979 3.093486 0.73 0.463 -3.797133 8.33709
|
serv_share_w | -.046387 .2441273 -0.19 0.849 -.5251826 .4324086
emp_ln | -.3211806 .0635373 -5.05 0.000 -.4457934 -.1965678
rslack_w | -.2355933 .0335971 -7.01 0.000 -.3014858 -.1697008
roa_w | -.561285 .138794 -4.04 0.000 -.8334954 -.2890747
c_gdp_growth | 3.33e-17 1.03e-16 0.32 0.746 -1.68e-16 2.35e-16
|
fyear |
2001 | -.3959973 .0751483 -5.27 0.000 -.5433821 -.2486124
2002 | -.988832 .0818588 -12.08 0.000 -1.149378 -.8282861
2003 | -.3473818 .0813068 -4.27 0.000 -.5068451 -.1879185
2004 | -.3633059 .0813813 -4.46 0.000 -.5229153 -.2036964
2005 | -.4444732 .0846911 -5.25 0.000 -.610574 -.2783723
2006 | -.4246806 .0859633 -4.94 0.000 -.5932765 -.2560846
2007 | -.5181246 .0905543 -5.72 0.000 -.6957245 -.3405247
2008 | -1.315703 .0936505 -14.05 0.000 -1.499375 -1.13203
2009 | -.947683 .0886127 -10.69 0.000 -1.121475 -.7738911
2010 | -.754661 .0926232 -8.15 0.000 -.9363186 -.5730034
2011 | -.9411679 .0958723 -9.82 0.000 -1.129198 -.7531379
2012 | -.8967765 .0956103 -9.38 0.000 -1.084293 -.7092605
2013 | -.4181452 .100154 -4.18 0.000 -.6145726 -.2217178
2014 | -.4486334 .0965006 -4.65 0.000 -.6378956 -.2593713
2015 | -.7013071 .0961237 -7.30 0.000 -.8898302 -.512784
2016 | -.8168549 .1021253 -8.00 0.000 -1.017149 -.6165613
2017 | -.5921297 .1035552 -5.72 0.000 -.7952278 -.3890316
2018 | -.9480196 .1012169 -9.37 0.000 -1.146532 -.7495075
2019 | -.7712998 .1060329 -7.27 0.000 -.9792572 -.5633423
|
_cons | 3.314159 .1268855 26.12 0.000 3.065304 3.563013
-----------------------------------------------------+----------------------------------------------------------------
sigma_u | 1.5196063
sigma_e | 1.4074744
rho | .53825232 (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------------------------------
(D) - Fixed effects, clustered by industries, with year dummies
Fixed-effects (within) regression Number of obs = 20696
Group variable: gvkey Number of groups = 1841
R-sq: within = 0.0988 Obs per group: min = 1
between = 0.2326 avg = 11.2
overall = 0.1886 max = 20
F(19,19) = .
corr(u_i, Xb) = 0.0262 Prob > F = .
(Std. Err. adjusted for 20 clusters in sic_2)
----------------------------------------------------------------------------------------------------------------------
| Robust
tobinq2_w | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------------------------------------------+----------------------------------------------------------------
related_4sic_share | .0340085 .3289331 0.10 0.919 -.6544564 .7224735
|
c.related_4sic_share#c.related_4sic_share | -.2135236 .5961222 -0.36 0.724 -1.461222 1.034175
|
mshare_w | .3829995 .2820869 1.36 0.190 -.2074153 .9734142
|
c.related_4sic_share#c.mshare_w | -.701038 .9782119 -0.72 0.482 -2.748459 1.346383
|
c.related_4sic_share#c.related_4sic_share#c.mshare_w | 2.234697 1.316921 1.70 0.106 -.5216499 4.991044
|
serv_share_w | -.0471057 .118492 -0.40 0.695 -.2951124 .2009009
emp_ln | -.3214172 .0636094 -5.05 0.000 -.4545531 -.1882812
rslack_w | -.2358683 .0317088 -7.44 0.000 -.3022355 -.1695011
roa_w | -.5590954 .3674014 -1.52 0.145 -1.328075 .2098845
|
fyear |
2001 | -.3747645 .1098026 -3.41 0.003 -.604584 -.1449449
2002 | -.9956165 .2527782 -3.94 0.001 -1.524687 -.4665457
2003 | -.3486831 .1674269 -2.08 0.051 -.6991116 .0017455
2004 | -.3645786 .1808435 -2.02 0.058 -.7430884 .0139312
2005 | -.447398 .2251272 -1.99 0.061 -.9185946 .0237987
2006 | -.4301572 .2144935 -2.01 0.059 -.8790971 .0187828
2007 | -.5267527 .2316885 -2.27 0.035 -1.011682 -.0418231
2008 | -1.326023 .2660602 -4.98 0.000 -1.882893 -.7691525
2009 | -.9542163 .1829604 -5.22 0.000 -1.337157 -.5712757
2010 | -.7621579 .1684687 -4.52 0.000 -1.114767 -.4095488
2011 | -.9510688 .1986958 -4.79 0.000 -1.366944 -.5351937
2012 | -.905346 .2134726 -4.24 0.000 -1.352149 -.4585427
2013 | -.4279537 .1790601 -2.39 0.027 -.8027308 -.0531766
2014 | -.4560108 .1917493 -2.38 0.028 -.8573467 -.054675
2015 | -.7080488 .1928884 -3.67 0.002 -1.111769 -.3043287
2016 | -.8275037 .2811845 -2.94 0.008 -1.41603 -.2389779
2017 | -.6002717 .2651018 -2.26 0.035 -1.155136 -.0454073
2018 | -.9546988 .3264345 -2.92 0.009 -1.637934 -.2714635
2019 | -.778409 .3227105 -2.41 0.026 -1.45385 -.1029681
|
_cons | 3.329964 .1917976 17.36 0.000 2.928527 3.7314
-----------------------------------------------------+----------------------------------------------------------------
sigma_u | 1.519513
sigma_e | 1.4080301
rho | .53802557 (fraction of variance due to u_i)
----------------------------------------------------------------------------------------------------------------------2.1. What code could I use to identify and filter out all singletons in my data for a specific model (combination of variables used - as some have missing variables sometimes)?I suspect that this could be causing the issues in my model. So far I have filtered out already companies were there is no variation in service share through the years (serv_share), and kept only companies that have at least 2 observations (have also tried out 5 years already). Still (as you can see in the output examples above) there are clusters with just 1 observation year.
Code used:2.2. Does it make sense to use xtivreg to drop singletons while still pursuing FE robust model in my case? Any downsides?
Code:* Down-sizing dataset only to firms with at least 1 year with a service segment bysort gvkey: egen serv_share_mean = mean(serv_share) // creating mean service share per gvkey drop if serv_share_mean == 0 // dropping all gvkey observations that have no services within the observation timeline *sum serv_share_mean * Dataset clearing from clusters with low number of observations drop if missing(related_4sic_share) // dropping observations that do not have my key IV values bys gvkey: keep if _N >= 2
General info about my data
Panel data for 2000-2019 years, ca. 1800 companies in the dataset from 16 industries (based on 2-digit SIC codes). Ending with "_w" variables were winsorized.
Data sample:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float(tobinq2_w related_4sic_share mshare_w advint_w mcompetition_w cr4_w mgrowth_w mturbulence_w mdynamism1_w mmunificence_w serv_share_w emp_ln rslack_w roa_w at_ln) double(c_gdp_growth c_serv_growth) float(mint_w sale_ln total_divers_w) 1.284673 .5 .015887061 .09268585 .8092887 .7649862 .0675343 .3638632 . . .5 1.9878744 -.003523689 .005926013 6.968942 412748401141975 375846545204892 . 6.903882 0 1.7389683 .3609704 .1176441 .0032615084 .9208679 .4853465 .4534543 .0485157 . . .4141069 4.6839814 .23261753 .08246606 11.877145 343747162873862 478793447126007 .05076491 11.905394 .8911811 .9990242 0 .00011655326 .00910845 .8035013 .8037748 .2283471 .2477131 . . .0990842 .12044616 .22527798 .019162526 2.246438 412748401141975 375846545204892 .3748521 2.776332 .4978528 .7638394 0 .06164662 .0078813 .60415 .9040137 .6412919 .209036 . . .9183996 .6754922 .3892642 .05414838 6.222297 412748401141975 375846545204892 . 7.44032 .44493955 13.31658 0 .0010040868 .03980114 .6938949 .9809943 .1869199 .1894787 . . 0 .22952315 .24714066 -.26159793 5.444459 412748401141975 375846545204892 .297381 4.634117 0 end

0 Response to Question re. F-stat missing in xtreg FE models and potential singleton issue
Post a Comment