Announcement

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

  • Error in Conducting Hausman Test in Stata15

    After running the command Hausman fe re; the result is accompanied with the following note

    Note: the rank of the differenced variance matrix (7) does not equal the number of coefficients being tested (15); be sure this is what you expect, or there may be problems computing the
    test. Examine the output of your estimators for anything unexpected and possibly consider scaling your variables so that the coefficients are on a similar scale.


    ---- Coefficients ----
    | (b) (B) (b-B) sqrt(diag(V_b-V_B))
    | fe re Difference S.E.
    -------------+----------------------------------------------------------------
    ta | .0600378 .0617464 -.0017086 .0005607
    crar | -5.371506 4.641974 -10.01348 .
    iinc | -4.557229 -5.098218 .5409888 .
    oe | 4.045686 4.551215 -.5055294 .
    ebt | 2.070417 2.38247 -.3120535 .
    prov | -.1965132 -.1831965 -.0133167 .
    profit | -1.361742 -2.387097 1.025355 .
    effi | 4319.949 2503.999 1815.95 2402.226
    nim | 220812.4 161165.6 59646.8 .
    roa | 1216235 119709.5 1096525 171092.7
    roe | -186693.8 -66803.78 -119890 18228.11
    gdp | .0159904 .0320229 -.0160326 .
    reer | 13007.2 28152.32 -15145.12 .
    cpi | -10493.3 -17774.22 7280.916 .
    cgdp | -71103.59 -10762.46 -60341.13 7479.311
    ------------------------------------------------------------------------------
    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(7) = (b-B)'[(V_b-V_B)^(-1)](b-B)
    = 69.43
    Prob>chi2 = 0.0000
    (V_b-V_B is not positive definite)

    Suggest some solution

  • #2
    Atul:
    welcome to this forum.
    It may be that you have singletons in your data.
    That said, you may want to test if -re- is the way to go via the community-contributed module -xtoverid-. However, be informed that -xtoverid. does not support -fvvarlist- notation; the usual fi is to create interactions by hand and to prefix your -xtreg,re- cose with -xi:- so that Stata can create categorical variable in a way that is palatable for -xtoverid-, like in the followinf toy-example:
    Code:
    . use "https://www.stata-press.com/data/r17/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . xi: xtreg ln_wage race year, re vce(cluster idcode)
    
    Random-effects GLS regression                   Number of obs     =     28,534
    Group variable: idcode                          Number of groups  =      4,711
    
    R-squared:                                      Obs per group:
         Within  = 0.1022                                         min =          1
         Between = 0.0912                                         avg =        6.1
         Overall = 0.0843                                         max =         15
    
                                                    Wald chi2(2)      =    1104.24
    corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
    
                                 (Std. err. adjusted for 4,711 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            race |  -.0982622   .0124751    -7.88   0.000     -.122713   -.0738114
            year |   .0186377   .0005772    32.29   0.000     .0175064    .0197691
           _cons |   .3321486   .0467886     7.10   0.000     .2404446    .4238526
    -------------+----------------------------------------------------------------
         sigma_u |  .36880264
         sigma_e |  .30347936
             rho |  .59625768   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . xtoverid
    
    Test of overidentifying restrictions: fixed vs random effects
    Cross-section time-series model: xtreg re  robust cluster(idcode)
    Sargan-Hansen statistic  15.474  Chi-sq(1)    P-value = 0.0001
    
    .
    As the -xtoverid- outcome rejects the null (H0=-re- is theway to go), -fe- is the right specification.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X