Announcement

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

  • Bootstrap for xtreg

    I have read some papers in which they apply bootstrap tecniques for panel data regressions

    For instance:

    Bootstrap, reps (1000): xtreg y x1 x2 ...xn, fe

    My question is, which are the benefits for using bootstrap command before xtreg? Would it improve the results? Would be the results more robust?

    Thanks in advance




  • #2
    Marcos:
    -bootstrap- is used after (not before) -xtreg- (or whatever command you need to invoke).
    Your question about the benefit of bootstrap is very broad and would require skimmimg through some reference texbooks, such as:
    Efron, B.; Tibshirani, R. (1993). An Introduction to the Bootstrap. Boca Raton, FL: Chapman & Hall/CRC;
    A. C. Davison (Author), D. V. Hinkley (1997). Bootstrap Methods and their Application (Cambridge Series in Statistical and Probabilistic Mathematics) 1st Edition .

    As a short answer, under regression framework the bootstrap is mainly used for calculating standard errors whenever the default ones are (suspected to be) biased.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      bootstrap, reps (100): xtreg propertyrights freedomfromcorruption
      (running xtreg on estimation sample)


      Bootstrap replications (100)
      ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5
      .................................................. 50
      .................................................. 100

      Random-effects GLS regression Number of obs = 430
      Group variable: N Number of groups = 23

      R-sq: within = 0.0928 Obs per group: min = 18
      between = 0.7738 avg = 18.7
      overall = 0.6504 max = 19

      Wald chi2(1) = 37.43
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      (Replications based on clustering on N)
      ---------------------------------------------------------------------------------------
      | Observed Bootstrap Normal-based
      propertyrights | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      ----------------------+----------------------------------------------------------------
      freedomfromcorruption | .3248804 .0530992 6.12 0.000 .2208079 .4289528
      _cons | 50.90743 3.385452 15.04 0.000 44.27207 57.54279
      ----------------------+----------------------------------------------------------------
      sigma_u | 8.3725386
      sigma_e | 5.9702967
      rho | .66291709 (fraction of variance due to u_i)
      ---------------------------------------------------------------------------------------

      . xtreg propertyrights freedomfromcorruption

      Random-effects GLS regression Number of obs = 430
      Group variable: N Number of groups = 23

      R-sq: within = 0.0928 Obs per group: min = 18
      between = 0.7738 avg = 18.7
      overall = 0.6504 max = 19

      Wald chi2(1) = 78.98
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      ---------------------------------------------------------------------------------------
      propertyrights | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      ----------------------+----------------------------------------------------------------
      freedomfromcorruption | .3248804 .0365554 8.89 0.000 .2532331 .3965276
      _cons | 50.90743 2.897801 17.57 0.000 45.22785 56.58702
      ----------------------+----------------------------------------------------------------
      sigma_u | 8.3725386
      sigma_e | 5.9702967
      rho | .66291709 (fraction of variance due to u_i)
      ---------------------------------------------------------------------------------------


      This is an example of how I have been told to apply it. The standard erros are different but the rest of the estimation remains robust.

      Comment


      • #4
        Marcos:
        in oder to avoid formatting issues, please, post what you typed and what Stata gave you back via CODE deliters (see FAQ on how to do it). Thanks.
        As expected, only standard errors are affected by the -bootstrap- procedure.
        You could have obtained the same results under -bootstrap- by invoking the -vce(bootstrap) option, like in the following toy-example (btw: as per Efrom and Tibshirani, 1993, quoted in the previous post, I would consider 200 bootstrap replications for regression standard errors):
        Code:
        . use "http://www.stata-press.com/data/r14/nlswork.dta", clear
        (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
        
        . xtreg ln_wage age race, fe
        note: race omitted because of collinearity
        
        Fixed-effects (within) 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
        
                                                        F(1,23799)        =    2720.20
        corr(u_i, Xb)  = 0.0314                         Prob > F          =     0.0000
        
        ------------------------------------------------------------------------------
             ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 age |   .0181349   .0003477    52.16   0.000     .0174534    .0188164
                race |          0  (omitted)
               _cons |   1.148214   .0102579   111.93   0.000     1.128107     1.16832
        -------------+----------------------------------------------------------------
             sigma_u |  .40635023
             sigma_e |  .30349389
                 rho |  .64192015   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        F test that all u_i=0: F(4709, 23799) = 8.81                 Prob > F = 0.0000
        
        
        . xtreg ln_wage age race, fe vce(bootstrap, nodots reps(200))
        
        Fixed-effects (within) 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)      =     904.08
        corr(u_i, Xb)  = 0.0314                         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 |   .0181349   .0006031    30.07   0.000     .0169528     .019317
                race |          0  (omitted)
               _cons |   1.148214   .0169047    67.92   0.000     1.115081    1.181346
        -------------+----------------------------------------------------------------
             sigma_u |  .40635023
             sigma_e |  .30349389
                 rho |  .64192015   (fraction of variance due to u_i)
        ------------------------------------------------------------------------------
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Thank you very much.

          Sorry for the formating issues. I will take it into account for the next time.

          Regards

          Comment

          Working...
          X