Announcement

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

  • Time trends in classical DiD

    I was reading the article titled "Mobilize for Our Lives? School Shootings and Democratic Accountability in U.S. Elections". https://www.cambridge.org/core/journ...DB555476F1FCB4
    The authors state that to improve their canonical DiD, "Given this, our preferred difference-in-differences models include county, year, and individual time trends for each county.This is a standard recommendation in the difference-in-difference literature (Angrist and Pischke 2008, 204; Wing, Simon, and Bello-Gomez 2018). It controls for differential trends across counties over time. This approach allows us to relax the tenuous parallel trends assumption key to difference-in-differences specifications. Here our identifying assumption is that our outcomes deviate from county-year effects by following the trend captured by the interaction of time with each county"

    Since the article didn't have equations to explain the above, I don't know what the above statement meant. In a classical DiD, I have seen Unit fixed effects (here county fixed effects) and time dummies.
    1. But how do we incorporate time trends in this, that too at the county level?
    2. Is it possible to have both time dummies and time trends at county level?
    3. How such time trends at the unit level deal with parallel trend assumption?

    Can someone share their views on this?

  • #2
    1. Below is an example for such a DiD setting.

    Code:
    reg Y DiD_var Covariates i.County i.Year i.County#c.Year, vce(cluster County)
    2. No, it's impossible because the "DiD_var" is at county-year level, and time dummies at county level (aka i.County#i.Year) would be perfectly collinear with "DiD_var". That's why we are at best able to control for county-specific time trends rather than dummies.

    3. If underlying trends are not parallel, the effect of "DiD_var" will capture something that is not related to the policy -- Additional control of county-specific trends will to some extent eliminate the contamination and correct the estimation bias.

    Comment


    • #3
      Dear Fei Wang
      Thanks for the instant reply. You mean something like this right?

      Code:
      clear
      input float(dep_var time_dum treat_dum indep_var1 indep_var2) int year long county
                 . 0 1  7.692159  .3566245 2011   11
       .0004316212 0 1  7.931967  .3026321 2012   11
       .0009798819 0 1  8.025386  .4967295 2013   11
       .0004258823 0 1  8.138857  .4602628 2014   11
       .0006037854 0 1  8.160204  .4324788 2015   11
       .0003257418 0 1  8.169874  .4278921 2016   11
       .0003573343 1 1  8.268808  .4538369 2017   11
        .000840538 1 1  8.310906  .4544985 2018   11
       .0004358438 1 1  8.385649  .4448069 2019   11
                 . 0 1  7.413488  .3170305 2011  289
                 . 0 1  7.465369  .4265102 2012  289
                 . 0 1  7.327781 .43153745 2013  289
                 . 0 1  7.207416  .3902475 2014  289
        .013887887 0 1  9.358657  .6830103 2011  363
        .012944066 0 1  9.282261   .635296 2012  363
         .02966934 0 1  9.338382  .5600299 2013  363
        .033251937 0 1  9.323365  .4138399 2014  363
         .03927926 0 1   9.20133  .3602918 2015  363
         .02396166 0 1   9.21132  .4900997 2016  363
        .028290564 1 1  9.158089 .47596115 2017  363
        .015586903 1 1  9.171402  .3467005 2018  363
         .04363366 1 1   9.14435  .6998312 2019  363
        .011656723 0 .  6.180017 .03726708 2016  414
        .003366078 1 .  5.964607  .0480226 2017  414
       .0017509046 1 .  5.776723 .05113108 2018  414
        .015753096 1 .  7.591811 .25162724 2018  415
        .015795665 1 .  7.536204   .273057 2019  415
        .012298487 0 .  6.630683 .29406333 2013  771
         .01164131 0 .  6.897806 .24431875 2014  771
        .007560391 0 .  7.113387  .2143613 2015  771
                 . 0 .  7.495042  .1589128 2016  771
                 . 1 .  7.675732 .13162291 2017  771
                 . 1 .  7.772121 .11822204 2018  771
                 . 1 .  7.871731 .10804316 2019  771
         .02086028 0 .  7.452112  .4684654 2011  783
        .018135212 0 .  7.504777  .4061761 2012  783
        .017521271 0 .  7.699978  .3961418 2013  783
        .014461728 0 .  7.688272   .366352 2014  783
         .01501166 0 .  7.688822    .42655 2015  783
        .015287423 0 .  7.686621  .3804956 2016  783
        .012225185 1 .  7.672339  .3541734 2017  783
        .009499525 1 .  7.673084  .3721915 2018  783
        .017904252 1 .  7.622028  .3375435 2019  783
        .010155834 0 .   9.46848  .2180963 2011 1120
        .009232343 0 .   9.61161  .2383646 2012 1120
        .011576294 0 .  9.826855 .20360494 2013 1120
        .006212078 0 . 10.014935  .1738267 2014 1120
        .006582727 0 .  10.14689 .21615265 2015 1120
        .008759675 0 . 10.239388 .24021226 2016 1120
        .010136684 1 .  10.37602 .20884947 2017 1120
        .014513596 1 . 10.482662 .18803462 2018 1120
        .011811976 1 . 10.609154 .20853548 2019 1120
       .0015640666 1 .  7.934478  .4667431 2017 2248
       .0019602769 1 .   8.00933 .48310015 2018 2248
        .006399653 0 1 10.212482 .52997494 2011 2717
        .006329288 0 1 10.179546  .5388584 2012 2717
        .007728022 0 1 10.359493  .4544449 2013 2717
        .007126532 0 1 10.229534  .4897545 2014 2717
        .006318392 0 1  10.36415  .4586011 2015 2717
        .007304068 0 1 10.589538 .45573065 2016 2717
        .007644575 1 1 10.676764  .4712567 2017 2717
         .01781795 1 1  11.94411  .7917002 2018 2717
        .008064844 1 1 11.893708   .699398 2019 2717
                 . 0 0  6.491785  .4182204 2011 2842
        .007868226 0 0  6.770675 .47379285 2012 2842
                 . 0 0  6.984253  .5271885 2013 2842
                 . 0 0  7.066552  .5113045 2014 2842
                 . 0 0  7.071573  .4876061 2015 2842
                 . 0 0  6.804171 .08928572 2016 2842
        .023384616 1 0  6.426327 .10746075 2017 2842
         .04488457 1 0  6.541318 .09463358 2018 2842
         .04024281 1 0  6.762383  .1248988 2019 2842
                 . 0 .  7.243656 .26422244 2011 3335
                 . 0 .  7.581821 .19707473 2012 3335
                 . 0 .  7.733684  .1971979 2013 3335
                 . 0 .  7.778254  .2117583 2014 3335
                 . 0 .  7.775822 .22432104 2015 3335
                 . 0 .  7.826403 .23201247 2016 3335
       .0018089972 1 .  7.927613  .2071913 2017 3335
        .003097816 1 .  8.108293 .16878895 2018 3335
       .0029224975 1 . 8.2735405 .25074002 2019 3335
       .0014152387 0 1  8.563141  .4552348 2011 3990
       .0013927576 0 1  9.215437 .44618005 2015 3990
        .001445136 0 1  9.308274  .4473882 2016 3990
        .002176853 1 1  9.385167  .4878761 2017 3990
        .002095181 1 1   9.53976  .4333314 2018 3990
       .0015393773 1 1  9.585972 .42918175 2019 3990
        .000912071 0 .  9.546169 .29451075 2011 3998
       .0006558138 0 .  9.717851 .26692954 2012 3998
        .000965813 0 .  9.987824  .3095832 2013 3998
       .0008525615 0 . 10.192468 .30943435 2014 3998
        .000951843 0 .  10.28826  .3290489 2015 3998
       .0014099505 0 . 10.297828  .4199662 2016 3998
       .0016309462 1 . 10.463384  .4847271 2017 3998
       .0040379567 1 .     10.69    .45495 2018 3998
       .0031935174 1 . 10.978138 .36645475 2019 3998
                 . 1 .  9.126492   .394467 2018 4024
                 . 1 .  9.173573  .4035377 2019 4024
      .00027535568 0 .   6.26435 .14157945 2016 4030
        .009245512 1 .  6.726233 .08764988 2017 4030
      end
      xtset county year

      Panel variable: county (unbalanced)
      Time variable: year, 2011 to 2019, but with a gap
      Delta: 1 unit

      Code:
      . 
      . reg  dep_var indep_var1  time_dum##treat_dum i.county i.year i.county#c.year,vce(cluster county)
      note: 2842.county omitted because of collinearity.
      note: 2019.year omitted because of collinearity.
      note: 3990.county#c.year omitted because of collinearity.
      
      Linear regression                               Number of obs     =         36
                                                      F(3, 4)           =          .
                                                      Prob > F          =          .
                                                      R-squared         =     0.8857
                                                      Root MSE          =      .0068
      
                                             (Std. err. adjusted for 5 clusters in county)
      ------------------------------------------------------------------------------------
                         |               Robust
                 dep_var | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
      -------------------+----------------------------------------------------------------
              indep_var1 |   .0067273   .0055968     1.20   0.296    -.0088119    .0222665
              1.time_dum |  -.0175192     .01737    -1.01   0.370     -.065746    .0307077
             1.treat_dum |   13.82433   5.556715     2.49   0.068    -1.603586    29.25224
                         |
      time_dum#treat_dum |
                    1 1  |   .0122443   .0152861     0.80   0.468    -.0301967    .0546854
                         |
                  county |
                    363  |   -4.49918   .7069768    -6.36   0.003    -6.462063   -2.536298
                   2717  |   1.264055   2.175515     0.58   0.592    -4.776143    7.304252
                   2842  |          0  (omitted)
                   3990  |   1.602395   1.331168     1.20   0.295    -2.093521    5.298311
                         |
                    year |
                   2012  |   -.000756   .0025537    -0.30   0.782    -.0078461    .0063341
                   2013  |    .003395     .00401     0.85   0.445    -.0077387    .0145286
                   2014  |   .0029404   .0043091     0.68   0.532    -.0090237    .0149044
                   2015  |   .0018248   .0051781     0.35   0.742     -.012552    .0162016
                   2016  |  -.0033836   .0024632    -1.37   0.242    -.0102226    .0034555
                   2017  |   .0007581   .0044702     0.17   0.874    -.0116531    .0131693
                   2018  |   .0001538   .0096994     0.02   0.988    -.0267761    .0270837
                   2019  |          0  (omitted)
                         |
           county#c.year |
                     11  |   .0007974   .0006627     1.20   0.295    -.0010424    .0026373
                    363  |   .0030398   .0009018     3.37   0.028     .0005359    .0055438
                   2717  |   .0001656   .0004897     0.34   0.752    -.0011941    .0015253
                   2842  |   .0076778   .0023104     3.32   0.029     .0012632    .0140924
                   3990  |          0  (omitted)
                         |
                   _cons |  -15.48464   4.638986    -3.34   0.029    -28.36453   -2.604748
      ------------------------------------------------------------------------------------
      .

      One more question, so can I use this method as above (if the above is correct) whenever I think parallel trends are not possible. For instance is this a panacea when parallel trends are impossible?

      Comment


      • #4
        As you have a panel data, then:

        Code:
        xtset county year
        xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)
        When you think the underlying trends are nonparallel, you may use this setting to handle this issue. After doing this, you may further test if parallel trend assumption holds (as below) -- it's possible that county-specific trends fail to fix the issue of the non-parallel trends.

        Code:
        xtreg dep_var c.treat_dum#i.year indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)

        Comment


        • #5
          Dear Fei Wang

          Thanks for the reply. How do I interpret the results of the second command with respect to parallel trend assumption? Which coefficients are important here? I am using the same dataset as in#3 and reproduce the results (for the commands 1 &2 ) here. Can you help me here to understand the interpretation of the coefficients?

          Code:
          xtset county year
          
          Panel variable: county (unbalanced)
           Time variable: year, 2011 to 2019, but with a gap
                   Delta: 1 unit
          
          .
          . 1) xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)
          note: 3990.county#c.year omitted because of collinearity.
          
          Fixed-effects (within) regression               Number of obs     =         36
          Group variable: county                          Number of groups  =          5
          
          R-squared:                                      Obs per group:
               Within  = 0.6046                                         min =          4
               Between = 0.7145                                         avg =        7.2
               Overall = 0.4690                                         max =          9
          
                                                          F(5,4)            =          .
          corr(u_i, Xb) = -1.0000                         Prob > F          =          .
          
                                                     (Std. err. adjusted for 5 clusters in county)
          ----------------------------------------------------------------------------------------
                                 |               Robust
                         dep_var | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
          -----------------------+----------------------------------------------------------------
          c.treat_dum#c.time_dum |   .0120488   .0118749     1.01   0.368    -.0209212    .0450188
                                 |
                      indep_var1 |   .0043025   .0048696     0.88   0.427    -.0092177    .0178227
                      indep_var2 |   .0109544   .0135523     0.81   0.464     -.026673    .0485817
                                 |
                            year |
                           2012  |  -.0000319   .0023415    -0.01   0.990    -.0065328     .006469
                           2013  |   .0044389   .0047657     0.93   0.404    -.0087929    .0176706
                           2014  |    .004676   .0064838     0.72   0.511     -.013326    .0226781
                           2015  |   .0040817    .007352     0.56   0.608    -.0163308    .0244942
                           2016  |  -.0011258   .0024965    -0.45   0.675    -.0080572    .0058055
                           2017  |  -.0142001   .0115627    -1.23   0.287    -.0463033    .0179032
                           2018  |  -.0142459   .0090842    -1.57   0.192    -.0394678     .010976
                           2019  |  -.0148199   .0141006    -1.05   0.353    -.0539693    .0243296
                                 |
                   county#c.year |
                             11  |     .00056    .000649     0.86   0.437    -.0012419    .0023619
                            363  |   .0028055   .0008206     3.42   0.027     .0005272    .0050838
                           2717  |   .0000997   .0005617     0.18   0.868    -.0014597    .0016592
                           2842  |   .0079205   .0016937     4.68   0.009     .0032182    .0126229
                           3990  |          0  (omitted)
                                 |
                           _cons |  -3.519801   .5525947    -6.37   0.003    -5.054049   -1.985552
          -----------------------+----------------------------------------------------------------
                         sigma_u |  6.7410254
                         sigma_e |  .00693568
                             rho |  .99999894   (fraction of variance due to u_i)
          ----------------------------------------------------------------------------------------
          
          *Because of your command I understand that
          xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county) is equvialent to running
          xtreg dep_var i.treat_dum#i.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)
          In the above models, c.treat_dum#c.time_dum is the DiD, right?
          
          
           xtreg dep_var c.treat_dum#i.year indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)
          note: 2011b.year#c.treat_dum omitted because of collinearity.
          note: 2013.year#c.treat_dum omitted because of collinearity.
          note: 2014.year#c.treat_dum omitted because of collinearity.
          note: 2015.year#c.treat_dum omitted because of collinearity.
          note: 2016.year#c.treat_dum omitted because of collinearity.
          note: 2019.year#c.treat_dum omitted because of collinearity.
          note: 2842.county#c.year omitted because of collinearity.
          note: 3990.county#c.year omitted because of collinearity.
          
          Fixed-effects (within) regression               Number of obs     =         36
          Group variable: county                          Number of groups  =          5
          
          R-squared:                                      Obs per group:
               Within  = 0.6831                                         min =          4
               Between = 0.1833                                         avg =        7.2
               Overall = 0.2590                                         max =          9
          
                                                          F(4,4)            =          .
          corr(u_i, Xb) = -1.0000                         Prob > F          =          .
          
                                               (Std. err. adjusted for 5 clusters in county)
          ----------------------------------------------------------------------------------
                           |               Robust
                   dep_var | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
          -----------------+----------------------------------------------------------------
          year#c.treat_dum |
                     2011  |          0  (omitted)
                     2012  |    .039672   .0057071     6.95   0.002     .0238265    .0555176
                     2013  |          0  (omitted)
                     2014  |          0  (omitted)
                     2015  |          0  (omitted)
                     2016  |          0  (omitted)
                     2017  |   .0159971   .0043398     3.69   0.021      .003948    .0280462
                     2018  |  -.0092706   .0092904    -1.00   0.375    -.0350648    .0165236
                     2019  |          0  (omitted)
                           |
                indep_var1 |   .0073347   .0042803     1.71   0.162    -.0045492    .0192186
                indep_var2 |    .007906   .0119968     0.66   0.546    -.0254026    .0412146
                           |
                      year |
                     2012  |  -.0399402   .0051505    -7.75   0.001    -.0542404     -.02564
                     2013  |     .00373   .0038429     0.97   0.387    -.0069396    .0143996
                     2014  |   .0036748   .0050999     0.72   0.511    -.0104848    .0178343
                     2015  |   .0026535   .0059649     0.44   0.679    -.0139078    .0192147
                     2016  |   -.002847   .0023567    -1.21   0.294    -.0093901    .0036962
                     2017  |  -.0190019   .0025255    -7.52   0.002    -.0260138     -.01199
                     2018  |    .001756   .0023506     0.75   0.497    -.0047704    .0082825
                     2019  |  -.0047464    .002296    -2.07   0.108    -.0111211    .0016282
                           |
             county#c.year |
                       11  |   .0008245    .000665     1.24   0.283    -.0010219    .0026708
                      363  |   .0032469    .000789     4.11   0.015     .0010561    .0054376
                     2717  |  -.0000824   .0005688    -0.14   0.892    -.0016617    .0014968
                     2842  |          0  (omitted)
                     3990  |          0  (omitted)
                           |
                     _cons |  -2.018406   .5910797    -3.41   0.027    -3.659507   -.3773061
          -----------------+----------------------------------------------------------------
                   sigma_u |  2.8557507
                   sigma_e |  .00641287
                       rho |  .99999496   (fraction of variance due to u_i)
          ----------------------------------------------------------------------------------
          
          . How do we interpret the coefficient of year#c.treat_dum?
          In what way the knots of Parallel trend can be untied here?
          Last edited by lal mohan kumar; 13 Nov 2021, 22:18.

          Comment


          • #6
            *Because of your command I understand that xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county) is equvialent to running xtreg dep_var i.treat_dum#i.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county) In the above models, c.treat_dum#c.time_dum is the DiD, right?
            Right.

            . How do we interpret the coefficient of year#c.treat_dum? In what way the knots of Parallel trend can be untied here?
            Let me make a little change to the original code, setting year 2011 as the base year without changing anything else.

            Code:
            xtreg dep_var c.treat_dum##ib(2011).year indep_var1 indep_var2 i.county#c.year, fe vce(cl county)
            As policy started in 2017 in your data, the key coefficients for parallel check are the interactions up to year 2016. For example, the coefficient of c.treat_dum#year2013 represents the treatment-control difference in y in 2013 as compared with that in 2011 (the base year). If trends are parallel, the coefficient of the interaction should be 0 (statistically insignificant). If all the coefficients, marked red, are insignificant, then the trends seem parallel.

            Code:
            Fixed-effects (within) regression               Number of obs     =         36
            Group variable: county                          Number of groups  =          5
            
            R-sq:                                           Obs per group:
                 within  = 0.6831                                         min =          4
                 between = 0.1833                                         avg =        7.2
                 overall = 0.2590                                         max =          9
            
                                                            F(4,4)            =          .
            corr(u_i, Xb)  = -1.0000                        Prob > F          =          .
            
                                                 (Std. Err. adjusted for 5 clusters in county)
            ----------------------------------------------------------------------------------
                             |               Robust
                     dep_var |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            -----------------+----------------------------------------------------------------
                   treat_dum |          0  (omitted)
                             |
                        year |
                       2012  |  -.0399402   .0051505    -7.75   0.001    -.0542404     -.02564
                       2013  |     .00373   .0038429     0.97   0.387    -.0069396    .0143996
                       2014  |   .0036748   .0050999     0.72   0.511    -.0104848    .0178343
                       2015  |   .0026535   .0059649     0.44   0.679    -.0139078    .0192147
                       2016  |   -.002847   .0023567    -1.21   0.294    -.0093901    .0036962
                       2017  |  -.0190019   .0025255    -7.52   0.002    -.0260138     -.01199
                       2018  |    .001756   .0023506     0.75   0.497    -.0047704    .0082825
                       2019  |  -.0047464    .002296    -2.07   0.108    -.0111211    .0016282
                             |
            year#c.treat_dum |
                       2012  |    .039672   .0057071     6.95   0.002     .0238265    .0555176
                       2013  |          0  (omitted)
                       2014  |          0  (omitted)
                       2015  |          0  (omitted)
                       2016  |          0  (omitted)
                       2017  |   .0159971   .0043398     3.69   0.021      .003948    .0280462
                       2018  |  -.0092706   .0092904    -1.00   0.375    -.0350648    .0165236
                       2019  |          0  (omitted)
                             |
                  indep_var1 |   .0073347   .0042803     1.71   0.162    -.0045492    .0192186
                  indep_var2 |    .007906   .0119968     0.66   0.546    -.0254026    .0412146
                             |
               county#c.year |
                         11  |   .0008245    .000665     1.24   0.283    -.0010219    .0026708
                        363  |   .0032469    .000789     4.11   0.015     .0010561    .0054376
                       2717  |  -.0000824   .0005688    -0.14   0.892    -.0016617    .0014968
                       2842  |          0  (omitted)
                       3990  |          0  (omitted)
                             |
                       _cons |  -2.018406     .59108    -3.41   0.027    -3.659508   -.3773053
            -----------------+----------------------------------------------------------------
                     sigma_u |  2.8557507
                     sigma_e |  .00641287
                         rho |  .99999496   (fraction of variance due to u_i)
            ----------------------------------------------------------------------------------

            Comment


            • #7
              Thanks Fei Wang. once again. Since most red highlighted coefficients (period 2011-16) are dropped and the only coefficient available is for 2012 which is statistically significant, can I say the non-existence of parallel trends? Also, are the droppings common or is it because of less no:observations.
              Finally, in #4 you mentioned that the above code is for further testing if parallel trend assumption holds or not. But it seems to me at this juncture that this code in particular

              Code:
               (1)
               xtreg dep_var c.treat_dum##ib(2011).year indep_var1 indep_var2 i.county#c.year, fe vce(cl county)
              Should be first run and if there is significant difference in treatment-control during the pre-intervention period then, there is no point in running the below code
              Code:
               (2)  
               xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year i.county#c.year, fe vce(cl county)
              I could be (must be) wrong, so what should be the right sequence of commands. For instance I ran the DID (2) and I got the coefficient of c.treat_dum#c.time_dum significant even after controlling for i.county#c.year. But when I ran (1) I found many coefficients in c.treat_dum##ib(2011).year prior to intervention period are significant can I still trust the DiD effects?
              I know I have asked so much and if it tests your patience, my sincere apologies for being an obtuse learner

              Comment


              • #8
                Since most red highlighted coefficients (period 2011-16) are dropped and the only coefficient available is for 2012 which is statistically significant, can I say the non-existence of parallel trends? Also, are the droppings common or is it because of less no:observations.
                I guess the huge number of missings may result from insufficient observations -- 36 obs can hardly support such a comprehensive model. You may run the code for the full sample.

                Should be first run and if there is significant difference in treatment-control during the pre-intervention period then, there is no point in running the below code
                It's a good question. I would do the following. First, test parallel trends in a standard setting, without county-specific trends. If the trends are parallel, then just explore DiD effects with the standard setting. In this case, you may still add county-specific trends to further consolidate your model or conduct a robustness check, without further checking parallel trends. If trends fail to be parallel in the standard setting, then I test for parallel trends after adding county-specific linear trends. If the assumption holds, I'll proceed; if not, I'll consider more complicated settings, such as adding more exogenous covariates or adding county-specific quadratic trends. In practice, if independent variables are properly controlled for, county-specific linear trends would be mostly sufficient for underlying trends being parallel.

                Comment


                • #9
                  First, test parallel trends in a standard setting, without county-specific trend[/QUOTE]

                  By the below command right
                  Code:
                  xtreg dep_var c.treat_dum##ib(2011).year indep_var1 indep_var2 i.year , fe vce(cl county)
                  If the trends are parallel
                  Coefficient of all c.treat_dum##ib.(2011).the year prior to the treatment period should be zero

                  then just explore DiD effects with the standard setting
                  Code:
                  xtreg dep_var c.treat_dum#c.time_dum indep_var1 indep_var2 i.year , fe vce(cl county)
                  If trends fail to be parallel in the standard setting, then I test for parallel trends after adding county-specific linear trends. If the assumption holds
                  Code:
                    
                    xtreg dep_var c.treat_dum##ib(2011).year indep_var1 indep_var2 i.county#c.year, fe vce(cl county)
                  Am I right?

                  Please answer this Fei Wang so that I can assure myself my learning is correct and I clearly understood what you taught

                  Comment


                  • #10
                    lal mohan kumar , #9 perfectly replays what I meant in #8.

                    Comment


                    • #11
                      Thanks a lot Fei Wang for taking the trouble and time to make me understand this.

                      Comment

                      Working...
                      X