Mario Macis <[email protected]> wrote that he could not use the cluster
option with -xtreg, fe-. This is no longer the case. In Stata 9, -xtreg,
fe- and -xtreg, re- offer the cluster option. Here is an example:
. webuse productivity
(Public Capital Productivity)
. xtreg gsp private emp hwy other unemp , fe i(state) cluster(region )
Fixed-effects (within) regression Number of obs = 816
Group variable (i): state Number of groups = 48
R-sq: within = 0.9437 Obs per group: min = 17
between = 0.9914 avg = 17.0
overall = 0.9903 max = 17
F(5,763) = 2967.05
corr(u_i, Xb) = -0.0738 Prob > F = 0.0000
(Std. Err. adjusted for 9 clusters in region)
------------------------------------------------------------------------------
| Robust
gsp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
private | .2921657 .0759316 3.85 0.005 .1170671 .4672643
emp | .8158864 .1047938 7.79 0.000 .5742314 1.057541
hwy | .0637546 .0726944 0.88 0.406 -.103879 .2313882
other | -.104222 .0735739 -1.42 0.194 -.2738836 .0654396
unemp | -.0045554 .0031479 -1.45 0.186 -.0118144 .0027037
_cons | 2.103227 .3677966 5.72 0.000 1.255087 2.951368
-------------+----------------------------------------------------------------
sigma_u | .09486872
sigma_e | .03739811
rho | .86550056 (fraction of variance due to u_i)
------------------------------------------------------------------------------
--David
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/