Announcement

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

  • estout test results

    I am trying to obtain the test results using estout command however I am unable to put them there.


    Code:
    reg y x1 x2 x3 x4
    eststo 1
    
    xtset ıd time
    
    xtreg y x1 x2 x3 x4,be
    
    eststo 2
    
    xtreg y x1 x2 x3 x4,fe
    
    eststo 3
    
    xtreg y x1 x2 x3 x4
    
    eststo 4
    
    hausman 3 4
    
    hausman 3 4, sigmamore
    
    estout 1 2 3 4, cells(b(star fmt(%9.4f)) se(par) t(par) p(par)) stats(N r2 r2_b r2_w r2_o , fmt(%9.4f %9.0g)labels (N))
    However I want to see the poolability test result(It gives automatically with xtreg) and also the hausman test result at the bottom of the table where r2 N etc exists. Can someone please help me on that?
    Last edited by MuhammetAli Cansi; 29 Mar 2023, 15:04.

  • #2
    estout is from SSC (FAQ Advice #12). The test of poolability is part of the stored estimates.

    Code:
    webuse grunfeld, clear
    xtreg invest mvalue kstock, fe
    ereturn list
    Res.:

    Code:
    . xtreg invest mvalue kstock, fe
    
    Fixed-effects (within) regression               Number of obs     =        200
    Group variable: company                         Number of groups  =         10
    
    R-squared:                                      Obs per group:
         Within  = 0.7668                                         min =         20
         Between = 0.8194                                         avg =       20.0
         Overall = 0.8060                                         max =         20
    
                                                    F(2,188)          =     309.01
    corr(u_i, Xb) = -0.1517                         Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
          invest | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
          mvalue |   .1101238   .0118567     9.29   0.000     .0867345    .1335131
          kstock |   .3100653   .0173545    17.87   0.000     .2758308    .3442999
           _cons |  -58.74393   12.45369    -4.72   0.000    -83.31086     -34.177
    -------------+----------------------------------------------------------------
         sigma_u |  85.732501
         sigma_e |  52.767964
             rho |  .72525012   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(9, 188) = 49.18                     Prob > F = 0.0000
    
    .
    . ereturn list
    
    scalars:
                   e(r2_w) =  .76675759381787
                    e(F_f) =  49.1766279136348
                   e(rank) =  3
                   e(Tbar) =  20
                   e(Tcon) =  1
                  e(g_min) =  20
                  e(g_avg) =  20
                  e(g_max) =  20
                    e(N_g) =  10
                e(sigma_u) =  85.73250064497634
                   e(corr) =  -.151724593121521
                   e(r2_o) =  .8059782143252492
                   e(r2_b) =  .8194301765498294
                e(sigma_e) =  52.76796426523782
                  e(sigma) =  100.6703517404121
                    e(rho) =  .7252501223783426
                      e(p) =  3.74892046727e-60
                    e(p_f) =  8.70011895951e-45
                   e(df_m) =  11
                   e(df_b) =  2
                   e(ll_0) =  -1216.348719738058
                     e(ll) =  -1070.781020103484
                    e(tss) =  9359943.916562427
                   e(df_a) =  9
                   e(r2_a) =  .753110431754022
                    e(rss) =  523478.1139071142
                    e(mss) =  1720874.113784922
                   e(rmse) =  52.76796426523782
                     e(r2) =  .76675759381787
                      e(F) =  309.0141925675344
                   e(df_r) =  188
                      e(N) =  200
    
    macros:
                e(cmdline) : "xtreg invest mvalue kstock, fe"
                    e(cmd) : "xtreg"
           e(marginsnotok) : "E U UE SCore STDP XBU"
                e(predict) : "xtrefe_p"
                  e(model) : "fe"
                    e(vce) : "conventional"
                   e(ivar) : "company"
                 e(depvar) : "invest"
             e(properties) : "b V"
    
    matrices:
                      e(b) :  1 x 3
                      e(V) :  3 x 3
    
    functions:
                 e(sample)
    For the Hausman test, the results are stored in r(). So you need to transfer them to e() using estadd, e.g.,

    Code:
    estadd scalar chi2= `r(chi2)'
    See an example of how to access the returned results by hausman in https://www.statalist.org/forums/for...d-hausman-test.
    Last edited by Andrew Musau; 29 Mar 2023, 15:16.

    Comment


    • #3
      Thank you so much for the answer I was circling arround it you made it quite understandable and clear

      Comment

      Working...
      X