Announcement

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

  • Fixed-Effects Model with clustered errors and year-dummy vs. Two-Way Clustered Model

    Hello,
    I'm currently writing my thesis about board composition and ESG-Performance of german firms.
    I have data of 121 firms from 2016-2020. Until now i made two regressions, but i don't know which of them is the most valid.
    I have a question regarding the solution of the time effect problem.
    The literature says that you can either take two-way clustered standard errors, or introduce a year-dummy in a One-Way clustered-error to counteract this.
    But when I run both Regressions, i get very different results. Could you tell me, where my mistake is and which one of them is more valid? Thanks in Advance!

    Fixed-Effects Model with clustered errors:
    xtreg ESG_Score MB SB WomenMB WomenSB Employee_SB Independant_BM VG logTotalDebt CSR_Committee logTotalRevenue RoAt0 RoAt1 RoAt2 i.Year, fe vce(cluster Comp_id)

    results:
    ESG_Score Coef. St.Err. t-value p-value [95% Conf Interval] Sig
    Anzahl_Vorstand .121 .423 0.29 .776 -.716 .958
    Anzahl_AR -.093 .424 -0.22 .826 -.933 .747
    Frauenquote_Vorstand -7.12 3.171 -2.25 .027 -13.4 -.841 **
    Frauenquote_AR 2.711 5.293 0.51 .609 -7.768 13.19
    Arbeitnehmerquote 15.113 9.316 1.62 .107 -3.332 33.558
    Independant_BM 10.858 4.3 2.53 .013 2.344 19.371 **
    VG -.734 .437 -1.68 .096 -1.6 .132 *
    logTotalDebt .281 .27 1.04 .3 -.253 .815
    CSR_Committee 4.545 1.75 2.60 .011 1.08 8.011 **
    logTotalRevenue 9.035 3.996 2.26 .026 1.122 16.947 **
    RoAt0 -48.152 9.313 -5.17 0 -66.59 -29.714 ***
    RoAt1 -7.406 8.917 -0.83 .408 -25.061 10.249
    RoAt2 .423 5.879 0.07 .943 -11.217 12.063
    2016b 0 . . . . .
    2017 1.804 .792 2.28 .025 .235 3.373 **
    2018 4.174 1.041 4.01 0 2.114 6.235 ***
    2019 6.653 1.263 5.27 0 4.153 9.153 ***
    2020 10.72 1.535 6.98 0 7.68 13.759 ***
    Constant -46.95 37.265 -1.26 .21 -120.732 26.833
    Mean dependent var 60.698 SD dependent var 19.464
    R-squared 0.516 Number of obs 485
    F-test . Prob > F .
    Akaike crit. (AIC) 2845.765 Bayesian crit. (BIC) 2912.711
    *** p<.01, ** p<.05, * p<.1


    Two-Way Clustered Model:
    reghdfe ESG_Score MB SB WomenMB WomenSB Employee_SB Independant_BM VG logTotalDebt CSR_Committee logTotalRevenue RoAt0 RoAt1 RoAt2 i.Year, absorb(temp) cluster(Comp_id Year)
    results:
    Robust
    ESG_Score Coefficient std. err t P>t [95% conf.interval]
    Anzahl_Vorstand 0.477 0.712 0.670 0.539 -1.499 2.454
    Anzahl_AR 0.091 0.479 0.190 0.858 -1.239 1.422
    Frauenquote_Vorstand 0.231 6.036 0.040 0.971 -16.529 16.990
    Frauenquote_AR 30.134 9.720 3.100 0.036 3.148 57.121
    Arbeitnehmerquote 3.491 8.731 0.400 0.710 -20.752 27.733
    Independant_BM 13.207 3.333 3.960 0.017 3.952 22.462
    VG -0.557 0.846 -0.660 0.546 -2.906 1.792
    logTotalDebt -0.091 0.990 -0.090 0.931 -2.838 2.657
    CSR_Committee 12.691 2.589 4.900 0.008 5.501 19.880
    logTotalRevenue 9.682 3.193 3.030 0.039 0.818 18.547
    RoAt0 -3.572 13.226 -0.270 0.800 -40.294 33.151
    RoAt1 -10.629 11.630 -0.910 0.412 -42.918 21.661
    RoAt2 -3.376 6.363 -0.530 0.624 -21.042 14.291
    Jahr
    2017 -0.865 0.448 -1.930 0.126 -2.110 0.379
    2018 -1.146 0.442 -2.590 0.060 -2.372 0.080
    2019 0.591 0.671 0.880 0.428 -1.272 2.454
    2020 2.597 0.905 2.870 0.046 0.084 5.110
    _cons -61.650 23.250 -2.650 0.057 -126.203 2.903
    Attached Files
    Last edited by Marian Dudeck; 11 Feb 2022, 08:41.

  • #2
    Marian:
    welcome to this forum.
    In your -reghdfe- code you -absorb()- -timevar- only and clustered standard errors differently..
    If coded correctly, both models shoudl give back the same results (exception made for the _cons):
    Code:
    use "https://www.stata-press.com/data/r17/nlswork.dta"
    . xtreg ln_wage c.age##c.age i.year, fe vce(cluster idcode)
    
    Fixed-effects (within) regression               Number of obs     =     28,510
    Group variable: idcode                          Number of groups  =      4,710
    
    R-squared:                                      Obs per group:
         Within  = 0.1162                                         min =          1
         Between = 0.1078                                         avg =        6.1
         Overall = 0.0932                                         max =         15
    
                                                    F(16,4709)        =      79.11
    corr(u_i, Xb) = 0.0613                          Prob > F          =     0.0000
    
                                 (Std. err. adjusted for 4,710 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0728746    .013687     5.32   0.000     .0460416    .0997075
                 |
     c.age#c.age |  -.0010113   .0001076    -9.40   0.000    -.0012224   -.0008003
                 |
            year |
             69  |   .0647054   .0155249     4.17   0.000     .0342693    .0951415
             70  |   .0284423   .0264639     1.07   0.283    -.0234395     .080324
             71  |   .0579959   .0384111     1.51   0.131    -.0173078    .1332996
             72  |   .0510671   .0502675     1.02   0.310    -.0474808     .149615
             73  |   .0424104   .0624924     0.68   0.497    -.0801038    .1649247
             75  |   .0151376    .086228     0.18   0.861    -.1539096    .1841848
             77  |   .0340933   .1106841     0.31   0.758    -.1828994     .251086
             78  |   .0537334   .1232232     0.44   0.663    -.1878417    .2953084
             80  |   .0369475   .1473725     0.25   0.802    -.2519716    .3258667
             82  |   .0391687   .1715621     0.23   0.819    -.2971733    .3755108
             83  |    .058766   .1836086     0.32   0.749    -.3011928    .4187249
             85  |   .1042758   .2080199     0.50   0.616    -.3035406    .5120922
             87  |   .1242272   .2327328     0.53   0.594    -.3320379    .5804922
             88  |   .1904977   .2486083     0.77   0.444    -.2968909    .6778863
                 |
           _cons |   .3937532   .2469015     1.59   0.111    -.0902893    .8777957
    -------------+----------------------------------------------------------------
         sigma_u |  .40275174
         sigma_e |  .30127563
             rho |  .64120306   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    .
    . reghdfe ln_wage c.age##c.age i.year, absorb(idcode ) vce(cluster idcode)
    (dropped 551 singleton observations)
    (MWFE estimator converged in 1 iterations)
    
    HDFE Linear regression                            Number of obs   =     27,959
    Absorbing 1 HDFE group                            F(  16,   4158) =      79.11
    Statistics robust to heteroskedasticity           Prob > F        =     0.0000
                                                      R-squared       =     0.6593
                                                      Adj R-squared   =     0.5995
                                                      Within R-sq.    =     0.1162
    Number of clusters (idcode)  =      4,159         Root MSE        =     0.3013
    
                                 (Std. err. adjusted for 4,159 clusters in idcode)
    ------------------------------------------------------------------------------
                 |               Robust
         ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0728746   .0136873     5.32   0.000     .0460402    .0997089
                 |
     c.age#c.age |  -.0010113   .0001076    -9.39   0.000    -.0012224   -.0008003
                 |
            year |
             69  |   .0647054   .0155252     4.17   0.000     .0342677    .0951432
             70  |   .0284423   .0264645     1.07   0.283    -.0234422    .0803268
             71  |   .0579959   .0384118     1.51   0.131    -.0173118    .1333037
             72  |   .0510671   .0502685     1.02   0.310    -.0474861    .1496203
             73  |   .0424104   .0624936     0.68   0.497    -.0801104    .1649313
             75  |   .0151376   .0862297     0.18   0.861    -.1539187    .1841939
             77  |   .0340933   .1106863     0.31   0.758    -.1829111    .2510976
             78  |   .0537334   .1232256     0.44   0.663    -.1878546    .2953214
             80  |   .0369475   .1473754     0.25   0.802    -.2519871    .3258822
             82  |   .0391687   .1715655     0.23   0.819    -.2971914    .3755288
             83  |    .058766   .1836122     0.32   0.749    -.3012121    .4187442
             85  |   .1042758    .208024     0.50   0.616    -.3035625     .512114
             87  |   .1242272   .2327373     0.53   0.594    -.3320624    .5805167
             88  |   .1904977   .2486132     0.77   0.444    -.2969171    .6779125
                 |
           _cons |   .3956251   .2469216     1.60   0.109    -.0884733    .8797234
    ------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
          idcode |      4159        4159           0    *|
    -----------------------------------------------------+
    * = FE nested within cluster; treated as redundant for DoF computation
    As an aside, please (and as per FAQ) do not post screenshots, as they are impossible to elaborate on, but use CODE delimiters instead. Thanks.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Hey Carlo,

      thanks a lot for your help! Very appreciate it.

      Kind regards,
      Marian

      Comment

      Working...
      X