Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xtoverid

    Dear All,
    I have a problem with comparing the FE and RE ( fixed effects/random effects) models.
    As i have heteroskedasticity ( and autocorr) I am trying to use xtoverid insead of hausman.
    But, when I run xtoverid, i get :
    xtreg z dlni, re robust cluster(_fx)

    Random-effects GLS regression Number of obs = 966
    Group variable: _fx Number of groups = 14

    R-sq: within = 0.0011 Obs per group: min = 69
    between = 0.1517 avg = 69.0
    overall = 0.0014 max = 69

    Wald chi2(1) = 5.43
    corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0198

    (Std. Err. adjusted for 14 clusters in _fx)
    ------------------------------------------------------------------------------
    | Robust
    z | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    dlni | .4568114 .1960974 2.33 0.020 .0724675 .8411552
    _cons | -.0009345 .0008815 -1.06 0.289 -.0026622 .0007932
    -------------+----------------------------------------------------------------
    sigma_u | 0
    sigma_e | .03422498
    rho | 0 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------

    . xtoverid
    Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS
    r(198);

    I dont know how to avoid this error.


    Also, xtoverid has been updated in 2016, but I dont know how to uninstall the previous version and reinstall the new one. ( Now i see stata goes to the new xtoverid, but this problem still appears).

    Thank you,
    Alexa

  • #2
    The random effects estimator implemented by xtreg is a two-step estimator in which the error components are estimated in a first step, and then GLS is done in the second step. It can sometimes happen that the estimates of one of the variance components is so small that it's actually negative. In that case, Stata sets it to zero, and the result is equivalent to pooled OLS. Baltagi's panel data textbook (various editions) has a discussion of this in one of the early chapters. You should probably find that if you do pooled OLS you get the same results as the ones you've reported above.

    As for updating xtoverid, you probably don't need to uninstall the previous version. Just ssc install xtoverid, replace will do what you want.

    Comment

    Working...
    X