Announcement

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

  • Bewildering labels reported in -etable- after -xtreg, mle-

    Dear All,
    while I was getting myself familiar with the wonderful capabilities of -etable-, I came across some bewildering labels as far as -xtreg, mle- results are concerned, as -sigma_u- and -sigma_e- estimates seem to be replicated as -Intercept-, too:
    Code:
    . use "https://www.stata-press.com/data/r17/nlswork.dta"
    (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
    
    . quietly xtreg ln_w grade c.age##c.age, re
    
    . estimates store xtreg_re
    
    . quietly xtreg ln_w grade c.age##c.age, mle
    
    . estimates store xtreg_re_mle
    
    . etable, estimates(xtreg_re xtreg_re_mle) mstat(N) mstat(F) mstat(r2_w) mstat(r2_b) mstat(r2_o) mstat(r2) mstat(r2_a) mstat(sigma_u) mst
    > at(sigma_e) mstat(rho) mstat(p) showstars showstarsnote column(estimate) title("My table")
    
    My table
    -----------------------------------------------------------------
                                               xtreg_re  xtreg_re_mle
    -----------------------------------------------------------------
    Current grade completed                     0.080 **    0.080 ** 
                                              (0.002)     (0.002)    
    Age in current year                         0.054 **    0.054 ** 
                                              (0.003)     (0.003)    
    Age in current year # Age in current year  -0.001 **   -0.001 ** 
                                              (0.000)     (0.000)    
    Intercept                                  -0.370 **   -0.370 ** 
                                              (0.045)     (0.045)    
    Intercept                                               0.295    
                                                          (0.004)    
    Intercept                                               0.303    
                                                          (0.001)    
    rho                                                     0.487    
                                                          (0.007)    
    Number of observations                      28508       28508    
    R-squared for within model                   0.11                
    R-squared for between model                  0.32                
    R-squared for overall model                  0.24                
    Panel-level standard deviation               0.31        0.30    
    Standard deviation of ε_it                   0.30        0.30    
    ρ                                            0.50        0.49    
    Model test p-value                           0.00        0.00    
    -----------------------------------------------------------------
    ** p<.01, * p<.05
    I think that this issue related to the way these -xtreg,mle- estimates are reported in the related matrix:
    Code:
    . quietly xtreg ln_w grade c.age##c.age, mle
    
    . mat list e(b)
    
    e(b)[1,6]
           ln_wage:    ln_wage:    ln_wage:    ln_wage:    sigma_u:    sigma_e:
                                     c.age#                                    
             grade         age       c.age       _cons       _cons       _cons
    y1    .0796508   .05386804  -.00061226   -.3698104   .29544794   .30329585
    
    .
    While this nuisance can be easily dealt with by deleting the replicate intercepts after a table has been obtained from -putdocx-, I would be interested in knowing whether this is a sort of bug or is due to othe reasons.
    Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

  • #2
    Strange. When I do
    Code:
     use "https://www.stata-press.com/data/r17/nlswork.dta", clear
     
    quietly xtreg ln_w grade c.age##c.age, re
    
    estimates store xtreg_re
    
    quietly xtreg ln_w grade c.age##c.age, mle
    
    estimates store xtreg_re_mle
    
    etable, estimates(xtreg_re xtreg_re_mle) ///
        mstat(N, label("OneInt")) ///
        mstat(F) mstat(r2_w) ///
        mstat(r2_b) ///
        mstat(r2_o) mstat(r2) mstat(r2_a) ///
        mstat(sigma_u) mstat(sigma_e) ///
        mstat(rho) mstat(p) ///
        showstars showstarsnote ///
        column(estimate) ///
        title("My table")
    The observations is modified as expected. But
    Code:
     use "https://www.stata-press.com/data/r17/nlswork.dta", clear
     
    quietly xtreg ln_w grade c.age##c.age, re
    
    estimates store xtreg_re
    
    quietly xtreg ln_w grade c.age##c.age, mle
    
    estimates store xtreg_re_mle
    
    etable, estimates(xtreg_re xtreg_re_mle) ///
        mstat(N) ///
        mstat(F) mstat(r2_w) ///
        mstat(r2_b) ///
        mstat(r2_o) mstat(r2) mstat(r2_a) ///
        mstat(sigma_u, label("OneInt")) mstat(sigma_e) ///
        mstat(rho) mstat(p) ///
        showstars showstarsnote ///
        column(estimate) ///
        title("My table")
    doesn't modify the sigma_u coefficient, it modifies the panel level standard deviation label.

    EDIT: even when I try and refer to the coefficient directly
    Code:
    use "https://www.stata-press.com/data/r17/nlswork.dta", clear
     
    quietly xtreg ln_w grade c.age##c.age, re
    
    estimates store xtreg_re
    
    quietly xtreg ln_w grade c.age##c.age, mle
    
    estimates store xtreg_re_mle
    
    etable, estimates(xtreg_re xtreg_re_mle) ///
        mstat(N) ///
        mstat(F) mstat(r2_w) ///
        mstat(r2_b) ///
        mstat(r2_o) mstat(r2) mstat(r2_a) ///
        mstat(e(b)[1,5], label("OneInt")) mstat(sigma_e) ///
        mstat(rho) mstat(p) ///
        showstars showstarsnote ///
        column(estimate) ///
        title("My table")
    for some reason it causes Stata to pretty much freeze like it's sweating through intense computations.
    Last edited by Jared Greathouse; 16 Apr 2022, 08:25.

    Comment

    Working...
    X