Announcement

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

  • For a Dif in Dif, reg or xtreg?

    Hi all,

    I am running the following staggered dif in dif where the variable of interest is Dit(Treatment*Post), group is my group variable showing treatment(it is a group of firms not a single firm) and fyear is the time variable:


    Code:
    reg Ya Dit log_at q_w roa_w sales_growth_w fyear_stock_performace leverage_w financial_constraint ret_sd instblckown_ratio_w rdassets_w rdassets_change_indicator capxassets_w assetintangibility_w fortune_500 containsrisk uniquecommitteecount log_wage i.fyear i.group,  vce(cluster cik)
    
    
    
    Linear regression                               Number of obs     =      1,711
                                                    F(29, 329)        =       9.30
                                                    Prob > F          =     0.0000
                                                    R-squared         =     0.2761
                                                    Root MSE          =     .26475
    
                                                   (Std. err. adjusted for 330 clusters in cik)
    -------------------------------------------------------------------------------------------
                              |               Robust
                         Ya | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
    --------------------------+----------------------------------------------------------------
                          Dit |   .0433924   .0200312     2.17   0.031     .0039869    .0827979
                       log_at |  -.0033164   .0115973    -0.29   0.775    -.0261306    .0194977
                          q_w |  -.0190526   .0224108    -0.85   0.396    -.0631393     .025034
                        roa_w |  -.0384923   .2222948    -0.17   0.863    -.4757908    .3988061
               sales_growth_w |   .3146239   .0619365     5.08   0.000     .1927823    .4364655
       fyear_stock_performace |   .0235292   .0240789     0.98   0.329    -.0238389    .0708973
                   leverage_w |    .000235   .0057096     0.04   0.967    -.0109969    .0114668
         financial_constraint |   .0213999   .0420888     0.51   0.611    -.0613973     .104197
                       ret_sd |   2.795826   1.329521     2.10   0.036     .1803918    5.411261
          instblckown_ratio_w |    .081117   .1175083     0.69   0.490    -.1500455    .3122794
                   rdassets_w |   .2935391   .7718691     0.38   0.704    -1.224882    1.811961
    rdassets_change_indicator |   .2371774   .0450438     5.27   0.000     .1485672    .3257876
                 capxassets_w |  -1.136542   .6557137    -1.73   0.084    -2.426463    .1533783
         assetintangibility_w |  -.1576374   .1026244    -1.54   0.125    -.3595203    .0442455
                  fortune_500 |  -.0609666   .0450022    -1.35   0.176     -.149495    .0275617
                 containsrisk |   .0820526   .0758179     1.08   0.280    -.0670964    .2312016
         uniquecommitteecount |   .0083096   .0109137     0.76   0.447    -.0131599    .0297792
                     log_wage |   .0060976   .0378791     0.16   0.872    -.0684181    .0806134
    
    ....
    Then, I thought why not to try xtreg?! And then I ran the following model. My quesiton is, which specificaiton is more reliable/reasonable/correct to report? xtreg with fe is very similar to the reg results mentioned above and it ends up removing my group indicators due to the collinearity between the group effects and the fixed effect. But I do not know why/how to rule out the RE model.
    Code:
    tsset cik fyear
    xtreg Ya Dit log_at q_w roa_w sales_growth_w fyear_stock_performace leverage_w financial_constraint ret_sd instblckown_ratio_w rdassets_w rdassets_change_indicator capxassets_w assetintangibility_w fortune_500 containsrisk uniquecommitteecount log_wage i.fyear i.group,re vce(cluster cik)
    
    Random-effects GLS regression                   Number of obs     =      1,711
    Group variable: cik                             Number of groups  =        330
    
    R-squared:                                      Obs per group:
         Within  = 0.0306                                         min =          1
         Between = 0.2408                                         avg =        5.2
         Overall = 0.2352                                         max =          6
    
                                                    Wald chi2(29)     =     107.84
    corr(u_i, X) = 0 (assumed)                      Prob > chi2       =     0.0000
    
                                                   (Std. err. adjusted for 330 clusters in cik)
    -------------------------------------------------------------------------------------------
                              |               Robust
                         Ya | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    --------------------------+----------------------------------------------------------------
                          Dit |    .032265   .0129934     2.48   0.013     .0067984    .0577316
                       log_at |  -.0066793   .0084666    -0.79   0.430    -.0232736     .009915
                          q_w |   .0030271   .0095897     0.32   0.752    -.0157684    .0218226
                        roa_w |   .1366377   .0691293     1.98   0.048     .0011469    .2721286
               sales_growth_w |   .0533237   .0238901     2.23   0.026     .0064999    .1001475
       fyear_stock_performace |   .0028065    .008552     0.33   0.743    -.0139551     .019568
                   leverage_w |  -.0010619   .0009059    -1.17   0.241    -.0028375    .0007136
         financial_constraint |   .0442714   .0192372     2.30   0.021     .0065672    .0819756
                       ret_sd |  -.3657277    .414918    -0.88   0.378    -1.178952    .4474966
          instblckown_ratio_w |   .0111513   .0606325     0.18   0.854    -.1076862    .1299888
                   rdassets_w |   1.042973   .5368405     1.94   0.052    -.0092152    2.095161
    rdassets_change_indicator |   .2472112   .0536758     4.61   0.000     .1420087    .3524138
                 capxassets_w |  -.2267981   .2185544    -1.04   0.299    -.6551568    .2015607
         assetintangibility_w |  -.0415342   .0551871    -0.75   0.452    -.1496989    .0666306
                  fortune_500 |  -.0346659   .0192657    -1.80   0.072    -.0724259    .0030942
                 containsrisk |    .004988   .0195374     0.26   0.798    -.0333045    .0432806
         uniquecommitteecount |   .0081462   .0045533     1.79   0.074    -.0007781    .0170705
                     log_wage |   .0129669   .0281526     0.46   0.645    -.0422111     .068145
                              |
                        ...
                              |
                        _cons |   .3344413   .2971543     1.13   0.260    -.2479703     .916853
    --------------------------+----------------------------------------------------------------
                      sigma_u |  .24998514
                      sigma_e |   .0814166
                          rho |  .90410091   (fraction of variance due to u_i)
    -------------------------------------------------------------------------------------------
    Many Thanks,
    Mahtab
    Last edited by Mahtab Karimi; 14 Jul 2024, 09:25.

  • #2
    The most efficient approach to this problem is to use -xtreg, fe-. Your -regress- version is completely equivalent to -xtreg, fe- and gives the same results you would have gotten with the latter. The -xtreg, fe- output is organized a bit more compactly than the way regress showed it, but substantively there would be no difference.

    You have, however, used -xtreg, re-, which is simply not appropriate for this problem. Your goal is to estimate a treatment effect, and the treatment effect is manifested in the real world as an outcome change within a group over time. These within-group parameters are properly estimated by -xtreg, fe-. -xtreg, re- estimates something different: it estimates a weighted average of that treatment effect along with the between-group differences in the outcome variable. So the -xtreg, re- result is "contaminated" by between-group differences that have nothing to do with the treatment effect. This is one way of explaining what is usually said more tersely in technical terms: the -re- estimator is not consistent.

    Yes, there are circumstances where an -re- estimator is appropriate. Foremost among those is when the treatment has been assigned by randomization or is otherwise demonstrably exogenous. Another is when the between-group differences are actually the same as the within-group differences--and there are some tests available for that. But, absent one of these exceptional conditions, you should use -xtreg, fe- (or your equivalent -regress ... i.group i.fyear-) for this kind of problem. (Also, if you were in a situation where the use of -xtreg, re- is appropriate, you would need to omit the i.group term from the fixed part of the model.)

    Comment


    • #3
      Thank you so much.

      Comment


      • #4
        you could use reghdfe and absorb both id and time fixed effects. cleaner output.

        Comment


        • #5
          thank you.

          Comment

          Working...
          X