Announcement

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

  • Estimating coefficients with random effects v Swamy-Arora

    When running a panel regression GLS, when is it preferred to use Swamy-Arora estimator of the variance components over the default random effects estimator in Stata?
    I read that Swamy-Arora is typically used for small samples but at the same time it is the default method in many statistical packages.
    My panel consists of 1,800 observations spread over 500 groups, so the number of observations per group is on average quite small...

    I ran three different models
    Code:
    xtreg y X, fe cluster(firm_id) robust
    Code:
    xtreg y X, sa vce(cluster firm_id)
    Code:
    xtreg y X, re vce(cluster firm)id)
    The results are in general quite similar but the significance of some of the interaction terms in X is changing depending on the chosen model. It would be great to get some insight into what the difference is when using 'sa' (i.e. different way of estimating the variance components) and how this can affect the significance of a coefficient.

    Thanks

  • #2
    Simon:
    some comments about your post:
    1) the first code you posted could be be more efficient:
    Code:
    use "http://www.stata-press.com/data/r14/nlswork.dta", clear
    . xtreg ln_wage tenure age, fe cluster (idcode) robust
    
    Fixed-effects (within) regression               Number of obs     =     28,101
    Group variable: idcode                          Number of groups  =      4,699
    
    R-sq:                                           Obs per group:
         within  = 0.1296                                         min =          1
         between = 0.1916                                         avg =        6.0
         overall = 0.1456                                         max =         15
    
                                                    F(2,4698)         =     766.79
    corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
    
                                 (Std. Err. adjusted for 4,699 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0211313   .0012112    17.45   0.000     .0187568    .0235059
             age |   .0121949   .0007414    16.45   0.000     .0107414    .0136483
           _cons |   1.256467   .0194187    64.70   0.000     1.218397    1.294537
    -------------+----------------------------------------------------------------
         sigma_u |  .39034493
         sigma_e |  .29808194
             rho |  .63165531   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . xtreg ln_wage tenure age, fe vce(cluster idcode)
    
    Fixed-effects (within) regression               Number of obs     =     28,101
    Group variable: idcode                          Number of groups  =      4,699
    
    R-sq:                                           Obs per group:
         within  = 0.1296                                         min =          1
         between = 0.1916                                         avg =        6.0
         overall = 0.1456                                         max =         15
    
                                                    F(2,4698)         =     766.79
    corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
    
                                 (Std. Err. adjusted for 4,699 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0211313   .0012112    17.45   0.000     .0187568    .0235059
             age |   .0121949   .0007414    16.45   0.000     .0107414    .0136483
           _cons |   1.256467   .0194187    64.70   0.000     1.218397    1.294537
    -------------+----------------------------------------------------------------
         sigma_u |  .39034493
         sigma_e |  .29808194
             rho |  .63165531   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Under -xtreg- (and unlike -regression-) -robust- and -cluster- options do the very same job:
    Code:
    use "http://www.stata-press.com/data/r14/nlswork.dta", clear
    . xtreg ln_wage tenure age, fe vce(robust)
    
    Fixed-effects (within) regression               Number of obs     =     28,101
    Group variable: idcode                          Number of groups  =      4,699
    
    R-sq:                                           Obs per group:
         within  = 0.1296                                         min =          1
         between = 0.1916                                         avg =        6.0
         overall = 0.1456                                         max =         15
    
                                                    F(2,4698)         =     766.79
    corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
    
                                 (Std. Err. adjusted for 4,699 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0211313   .0012112    17.45   0.000     .0187568    .0235059
             age |   .0121949   .0007414    16.45   0.000     .0107414    .0136483
           _cons |   1.256467   .0194187    64.70   0.000     1.218397    1.294537
    -------------+----------------------------------------------------------------
         sigma_u |  .39034493
         sigma_e |  .29808194
             rho |  .63165531   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    . xtreg ln_wage tenure age, fe vce(cluster idcode)
    
    Fixed-effects (within) regression               Number of obs     =     28,101
    Group variable: idcode                          Number of groups  =      4,699
    
    R-sq:                                           Obs per group:
         within  = 0.1296                                         min =          1
         between = 0.1916                                         avg =        6.0
         overall = 0.1456                                         max =         15
    
                                                    F(2,4698)         =     766.79
    corr(u_i, Xb)  = 0.1302                         Prob > F          =     0.0000
    
                                 (Std. Err. adjusted for 4,699 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .0211313   .0012112    17.45   0.000     .0187568    .0235059
             age |   .0121949   .0007414    16.45   0.000     .0107414    .0136483
           _cons |   1.256467   .0194187    64.70   0.000     1.218397    1.294537
    -------------+----------------------------------------------------------------
         sigma_u |  .39034493
         sigma_e |  .29808194
             rho |  .63165531   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Eventually, the -sa- option works for -re- only: hence, no wonder that the results you got with your last code are similar, but not, identical, to the ones you obtained with the no-sa- -re- specification (and differ again from the results displayed by Stata under the -fe- specification, a pretty different beast).

    As always, a good place to start from is the -xtreg- entry in Stata .pdf manual, which reports many valuable refernces about the topic(s) you're interested in.
    Last edited by Carlo Lazzaro; 13 Sep 2017, 05:34.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Dear Carlo,

      Thanks for the response and apologies for the very late reply. We ended up submitting the paper after which this slipped my mind. However, I am not sure how your answer improves my understanding. Learning that after xtreg robust and cluster result in the same coefficients is useful for sure, but my main question was about when to use Swamy-Arora estimators of the variance component and under which conditions using those will result in different significance of the coefficients. Specifically, in a sample with many small groups, which results will be more reliable?
      (unless this is what you meant with "code 1 is more efficient")?

      Thanks again!

      Comment


      • #4
        Simon:
        as per -xtreg- entry, Swamy-Arora (SA) estimator is preferable to default -re- when the sample is small (which is obviously a qualitative feature of a quantitattive matter) and the panel is unbalanced.
        I would skim through the literature in your reesearch field and see who and when adopted estimator instead of default -re- specidication.
        For more on this iussue: Baltagi, B. H., and Y.-J. Chang. 1994. Incomplete panels: A comparative study of alternative estimators for the unbalanced one-way error component regression model. Journal of Econometrics 62: 67–89.

        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Thanks a lot for your suggestion. Will have a read through that article.

          Comment

          Working...
          X