Samuel:
please read the -xtreg- entry in Stata .pdf manual.
1) non-default standard errors (SEs) makes thec alculation of the F-test you mention unfeasible (ie, too complicated): that's why Stata omits it;
2) you're correct in clustering SEs on -panelid- for both -fe- and -re- specification;
3) -xtoverid- outcome points you toward -fe- specification; it's equivalent to -hausman- outcome;
4) -xi:- is needed before -xtreg,re- because -xtoverid- does not support -fvvarlist- notation. Conversely, if you compare -fe- vs -re- with default SEs, you go -hausman- which does not support non-default SEs (unlike (-xtoverid-), but support -fvvarlist- notation (unlike -xtoverid- again).
Please note that you can use the community-contributed progranmme -xtoverid- with default SEs, too:
That'swhy -xtoverid- can be a work-around when -hausman- throws the warning message you got.
5) your data do not show evidence of serial correlation. However, since your dataset showed heteroskedasticity and you wiseely invoked SEs, stay with clustered SEs.
please read the -xtreg- entry in Stata .pdf manual.
1) non-default standard errors (SEs) makes thec alculation of the F-test you mention unfeasible (ie, too complicated): that's why Stata omits it;
2) you're correct in clustering SEs on -panelid- for both -fe- and -re- specification;
3) -xtoverid- outcome points you toward -fe- specification; it's equivalent to -hausman- outcome;
4) -xi:- is needed before -xtreg,re- because -xtoverid- does not support -fvvarlist- notation. Conversely, if you compare -fe- vs -re- with default SEs, you go -hausman- which does not support non-default SEs (unlike (-xtoverid-), but support -fvvarlist- notation (unlike -xtoverid- again).
Please note that you can use the community-contributed progranmme -xtoverid- with default SEs, too:
Code:
. use "https://www.stata-press.com/data/r16/nlswork.dta" (National Longitudinal Survey. Young Women 14-26 years of age in 1968) . xtreg ln_wage age, re Random-effects GLS regression Number of obs = 28,510 Group variable: idcode Number of groups = 4,710 R-sq: Obs per group: within = 0.1026 min = 1 between = 0.0877 avg = 6.1 overall = 0.0774 max = 15 Wald chi2(1) = 3140.35 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ ln_wage | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0185667 .0003313 56.04 0.000 .0179174 .0192161 _cons | 1.120439 .0112038 100.01 0.000 1.09848 1.142398 -------------+---------------------------------------------------------------- sigma_u | .36972456 sigma_e | .30349389 rho | .59743613 (fraction of variance due to u_i) ------------------------------------------------------------------------------ . xtoverid Test of overidentifying restrictions: fixed vs random effects Cross-section time-series model: xtreg re Sargan-Hansen statistic 17.401 Chi-sq(1) P-value = 0.0000 . quietly xtreg ln_wage age, fe . estimate store fe . quietly xtreg ln_wage age, re . estimate store re . hausman fe re ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | fe re Difference S.E. -------------+---------------------------------------------------------------- age | .0181349 .0185667 -.0004318 .0001055 ------------------------------------------------------------------------------ b = consistent under Ho and Ha; obtained from xtreg B = inconsistent under Ha, efficient under Ho; obtained from xtreg Test: Ho: difference in coefficients not systematic chi2(1) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 16.76 Prob>chi2 = 0.0000 . estimate store re . xtoverid Test of overidentifying restrictions: fixed vs random effects Cross-section time-series model: xtreg re Sargan-Hansen statistic 17.401 Chi-sq(1) P-value = 0.0000 .
5) your data do not show evidence of serial correlation. However, since your dataset showed heteroskedasticity and you wiseely invoked SEs, stay with clustered SEs.
Comment