Announcement

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

  • A question about -xtoverid- with bootstrapped standard errors.

    Hi,

    first I want to thank Mark Schaffer and Steven Stillman for the xtoverid package. I have used it many times with IV estimations, and panel data, and I really appreciate it.

    I am currently looking into a way of testing fixed effects versus random effects with bootstrapped standard errors, and I was wondering if I can just simply use xtoverid, after the random effects estimation with bootstrapped standard errors. The other alternative I am looking into is using Mundlak (1978)'s approach, but that makes me estimate both the unrestricted and restricted model bootstrapped VCE, which just takes longer.

    Any thoughts, and suggestions are very welcome!!!
    Alfonso Sanchez-Penalver

  • #2
    Alfonso:
    I would follow this route:
    Code:
    . use "http://www.stata-press.com/data/r15/nlswork.dta"
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . xtreg ln_wage age, re vce(bootstrap, reps(200) dots(1))
    (running xtreg on estimation sample)
    
    Bootstrap replications (200)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
    ..................................................    50
    ..................................................   100
    ..................................................   150
    ..................................................   200
    
    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)      =    1009.32
    corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
    
                                  (Replications based on 4,710 clusters in idcode)
    ------------------------------------------------------------------------------
                 |   Observed   Bootstrap                         Normal-based
         ln_wage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             age |   .0185667   .0005844    31.77   0.000     .0174213    .0197122
           _cons |   1.120439   .0167217    67.01   0.000     1.087665    1.153212
    -------------+----------------------------------------------------------------
         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  robust cluster(idcode)
    Sargan-Hansen statistic  14.529  Chi-sq(1)    P-value = 0.0001
    
    .
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Thank you Carlo! That's what I had in mind.

      Also I forgot to refer my citation in my previous message. I apologize. Here is the appropriate reference.

      Reference

      Mundlak, Yair (1978), "On the Pooling of Time Series and Cross Section Data," Econometrica, January 1978, 46 (1), 69-85.
      Alfonso Sanchez-Penalver

      Comment


      • #4
        Alfonso:
        thanks for the full reference.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Hi Carlo Lazzaro, after reading the help for xtoverid I see that it basically does the Mundlak test I mentioned. It doesn't seem to work with bootstrapped errors, however, since it reproduces the same results as when you simply used the cluster-robust variance estimator. In the text that xtoverid presents before producing the chi-squared and p-value, it produces the same specification of the model for both cases, so it seems to be identifying that you have clustered on the panel variable, and uses the cluster-robust variance estimator. I, therefore, conclude that, unfortunately, you have to specify the test yourself by doing the augmented random-effects estimation with bootstrapped errors, and do the Wald test of exclusion of the added terms.

          Best and thanks!!!
          Alfonso Sanchez-Penalver

          Comment


          • #6
            Alfonso:
            many thanks for sharing your experience with the theory underlying the community-contributed command -xtoverid-.
            Kind regards,
            Carlo
            (Stata 18.0 SE)

            Comment

            Working...
            X