Announcement

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

  • Reghdfe vce(robust) or vce(cluster var)

    Hello,

    Could somebody explain to me the difference between the two commands:

    reghdfe y var1 var2, absorb(var3, var4) vce(robust)

    reghdfe y var1 var2, absorb(var3, var4) vce(cluster var4)

    Thank you!


  • #2
    Within my analysis with the vce(robust) my variable is signifiact and with the vce(cluster var) command the variable becomes insignificant. Can someone explain to me the difference?

    Code:
     reghdfe bda announcement_eligible eligible announcement l_lnassets l_roa, absorb(c incorp indus t) vce(robust)
    (converged in 3 iterations)
    note: eligible omitted because of collinearity
    note: announcement omitted because of collinearity
    
    HDFE Linear regression                            Number of obs   =      3,944
    Absorbing 4 HDFE groups                           F(   3,   3441) =       3.18
    Statistics robust to heteroskedasticity           Prob > F        =     0.0230
                                                      R-squared       =     0.8970
                                                      Adj R-squared   =     0.8820
                                                      Within R-sq.    =     0.0393
                                                      Root MSE        =     0.1505
    
    ---------------------------------------------------------------------------------------
                          |               Robust
                      bda |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ----------------------+----------------------------------------------------------------
    announcement_eligible |   .0123368   .0070483     1.75   0.080    -.0014824    .0261561
                 eligible |          0  (omitted)
             announcement |          0  (omitted)
               l_lnassets |  -.0151639    .021781    -0.70   0.486     -.057869    .0275411
                    l_roa |  -.8755667   .3424687    -2.56   0.011    -1.547029   -.2041042
    ---------------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    ------------------------------------------------------------------------+
              Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
    ----------------------+-------------------------------------------------|
                        c |          493             493              0     |
                   incorp |            0              16             16     |
                    indus |            0              56             56 ?   |
                        t |            7               8              1 ?   |
    ------------------------------------------------------------------------+
    ? = number of redundant parameters may be higher
    Code:
     reghdfe bda announcement_eligible eligible announcement l_lnassets l_roa, absorb(c incorp indus t) vce(cluster c)
    (converged in 3 iterations)
    note: eligible omitted because of collinearity
    note: announcement omitted because of collinearity
    
    HDFE Linear regression                            Number of obs   =      3,944
    Absorbing 4 HDFE groups                           F(   3,    492) =       1.63
    Statistics robust to heteroskedasticity           Prob > F        =     0.1826
                                                      R-squared       =     0.8970
                                                      Adj R-squared   =     0.8796
                                                      Within R-sq.    =     0.0393
    Number of clusters (c)       =        493         Root MSE        =     0.1521
    
                                                 (Std. Err. adjusted for 493 clusters in c)
    ---------------------------------------------------------------------------------------
                          |               Robust
                      bda |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ----------------------+----------------------------------------------------------------
    announcement_eligible |   .0123368   .0149394     0.83   0.409     -.017016    .0416897
                 eligible |          0  (omitted)
             announcement |          0  (omitted)
               l_lnassets |  -.0151639   .0309505    -0.49   0.624    -.0759755    .0456476
                    l_roa |  -.8755667   .5327249    -1.64   0.101    -1.922263    .1711297
    ---------------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    ------------------------------------------------------------------------+
              Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
    ----------------------+-------------------------------------------------|
                        c |            0             493            493 *   |
                   incorp |           15              16              1     |
                    indus |           55              56              1     |
                        t |            7               8              1 ?   |
    ------------------------------------------------------------------------+
    ? = number of redundant parameters may be higher
    * = fixed effect nested within cluster; treated as redundant for DoF computation
    
    .

    Comment


    • #3
      Assuming that var4 is your panel variable, the default behavior for panel data commands in Stata is to use

      Code:
      cluster(var4)
      You can find the literature relating to (the justification of) this in the manual of xtreg.



      -vce(robust)- in reghdfe will cluster by observation (i.e., you assume that each observation is independent) which (arguably) is not correct for panel data. There is some dependence between observations of an entity across time. So these two are equivalent

      Code:
      gen n= _n
      reghdfe...., vce(robust)
      reghdfe...., cluster(n)

      Comment


      • #4
        But how come both the commands give different outputs?
        reghdfe....vce(robust)
        reghdfe...vce(cluster c)

        Code:
        . reghdfe bda announcement_eligible announcement eligible l_lnassets l_roa, absorb(c t indus incorp) vce(robust)
        (converged in 3 iterations)
        note: announcement omitted because of collinearity
        note: eligible omitted because of collinearity
        
        HDFE Linear regression                            Number of obs   =      3,944
        Absorbing 4 HDFE groups                           F(   3,   3441) =       3.18
        Statistics robust to heteroskedasticity           Prob > F        =     0.0230
                                                          R-squared       =     0.8970
                                                          Adj R-squared   =     0.8820
                                                          Within R-sq.    =     0.0393
                                                          Root MSE        =     0.1505
        
        ---------------------------------------------------------------------------------------
                              |               Robust
                          bda |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        ----------------------+----------------------------------------------------------------
        announcement_eligible |   .0123368   .0070483     1.75   0.080    -.0014824    .0261561
                 announcement |          0  (omitted)
                     eligible |          0  (omitted)
                   l_lnassets |  -.0151639    .021781    -0.70   0.486     -.057869    .0275411
                        l_roa |  -.8755667   .3424687    -2.56   0.011    -1.547029   -.2041042
        ---------------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        ------------------------------------------------------------------------+
                  Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
        ----------------------+-------------------------------------------------|
                            c |          493             493              0     |
                            t |            7               8              1     |
                        indus |            0              56             56 ?   |
                       incorp |            0              16             16 ?   |
        ------------------------------------------------------------------------+
        ? = number of redundant parameters may be higher
        Code:
         reghdfe bda announcement_eligible announcement eligible l_lnassets l_roa, absorb(c t indus incorp) vce(cluster c)
        (converged in 3 iterations)
        note: announcement omitted because of collinearity
        note: eligible omitted because of collinearity
        
        HDFE Linear regression                            Number of obs   =      3,944
        Absorbing 4 HDFE groups                           F(   3,    492) =       1.63
        Statistics robust to heteroskedasticity           Prob > F        =     0.1826
                                                          R-squared       =     0.8970
                                                          Adj R-squared   =     0.8796
                                                          Within R-sq.    =     0.0393
        Number of clusters (c)       =        493         Root MSE        =     0.1521
        
                                                     (Std. Err. adjusted for 493 clusters in c)
        ---------------------------------------------------------------------------------------
                              |               Robust
                          bda |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        ----------------------+----------------------------------------------------------------
        announcement_eligible |   .0123368   .0149394     0.83   0.409     -.017016    .0416897
                 announcement |          0  (omitted)
                     eligible |          0  (omitted)
                   l_lnassets |  -.0151639   .0309505    -0.49   0.624    -.0759755    .0456476
                        l_roa |  -.8755667   .5327249    -1.64   0.101    -1.922263    .1711297
        ---------------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        ------------------------------------------------------------------------+
                  Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
        ----------------------+-------------------------------------------------|
                            c |            0             493            493 *   |
                            t |            7               8              1     |
                        indus |           55              56              1     |
                       incorp |           15              16              1 ?   |
        ------------------------------------------------------------------------+
        ? = number of redundant parameters may be higher
        * = fixed effect nested within cluster; treated as redundant for DoF computation
        
        .
        And both

        reghdfe...cluster(c) and
        reghdfe... vce(cluster c)

        Code:
        . reghdfe bda announcement_eligible announcement eligible l_lnassets l_roa, absorb(c t indus incorp) vce(cluster c)
        (converged in 3 iterations)
        note: announcement omitted because of collinearity
        note: eligible omitted because of collinearity
        
        HDFE Linear regression                            Number of obs   =      3,944
        Absorbing 4 HDFE groups                           F(   3,    492) =       1.63
        Statistics robust to heteroskedasticity           Prob > F        =     0.1826
                                                          R-squared       =     0.8970
                                                          Adj R-squared   =     0.8796
                                                          Within R-sq.    =     0.0393
        Number of clusters (c)       =        493         Root MSE        =     0.1521
        
                                                     (Std. Err. adjusted for 493 clusters in c)
        ---------------------------------------------------------------------------------------
                              |               Robust
                          bda |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        ----------------------+----------------------------------------------------------------
        announcement_eligible |   .0123368   .0149394     0.83   0.409     -.017016    .0416897
                 announcement |          0  (omitted)
                     eligible |          0  (omitted)
                   l_lnassets |  -.0151639   .0309505    -0.49   0.624    -.0759755    .0456476
                        l_roa |  -.8755667   .5327249    -1.64   0.101    -1.922263    .1711297
        ---------------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        ------------------------------------------------------------------------+
                  Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
        ----------------------+-------------------------------------------------|
                            c |            0             493            493 *   |
                            t |            7               8              1     |
                        indus |           55              56              1     |
                       incorp |           15              16              1 ?   |
        ------------------------------------------------------------------------+
        ? = number of redundant parameters may be higher
        * = fixed effect nested within cluster; treated as redundant for DoF computation
        
        .
        give the same output.

        Does it have something to do with the absorbed degrees of freedom. As presented in the two outputs you see that they are different for the two regressions. Can some explain to me what they mean?

        Thank you!

        Comment


        • #5
          Read #3 again and the suggested xtreg manual reference.

          Comment

          Working...
          X