Announcement

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

  • DID problem with 2 pre treatment periods

    Dear Statalist,

    I'm running a fixed effects diff. in diff. I have data on 1,000 firms for 3 years with the treatment being carried out in period 3. I coded treatgroup as a dummy with 1 for treated and 0 for untreated; years contains 2013 2014 and 2015 and in my understanding, it can be used with i. the covariates are continuous.

    My objective is to estimate: (PRODUCTIVITY)t= (TREATMENT)t + YEARS + Fixed Effects + Covariates+ Error

    if I use just two periods (1 pre treatment and 1 with treatment) I get:

    Code:
    xtreg prod treatgroup##i.year capital_per_worker graduates if year==2014 | year==2015, fe
    note: 1.treatgroup omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =      2,000
    Group variable: id                              Number of groups  =      1,000
    
    R-sq:                                           Obs per group:
         within  = 0.8176                                         min =          2
         between = 0.9982                                         avg =        2.0
         overall = 0.9978                                         max =          2
    
                                                    F(4,996)          =    1116.00
    corr(u_i, Xb)  = -0.8917                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------------
          productivity |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------------+----------------------------------------------------------------
          1.treatgroup |          0  (omitted)
                       |
                  year |
                 2015  |   14.14306   1.172699    12.06   0.000     11.84181     16.4443
                       |
       treatgroup#year |
               1 2015  |   3.527095   1.093077     3.23   0.001     1.382097    5.672094
                       |
    capital_per_worker |   .3243046   .0151881    21.35   0.000     .2945002     .354109
             graduates |  -.0108163   .1042296    -0.10   0.917     -.215351    .1937185
                 _cons |  -3.904104   40.72751    -0.10   0.924    -83.82568    76.01747
    -------------------+----------------------------------------------------------------
               sigma_u |  39.766188
               sigma_e |  11.913944
                   rho |  .91763318   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------
    F test that all u_i=0: F(999, 996) = 4.51                    Prob > F = 0.0000
    However, if I add the second pretreatment period I get:

    Code:
     xtreg prod treatg##i.year capital_per_worker graduates, fe
    note: 1.treatgroup omitted because of collinearity
    
    Fixed-effects (within) regression               Number of obs     =      3,000
    Group variable: id                              Number of groups  =      1,000
    
    R-sq:                                           Obs per group:
         within  = 0.8501                                         min =          3
         between = 0.9975                                         avg =        3.0
         overall = 0.9968                                         max =          3
    
                                                    F(6,1994)         =    1884.53
    corr(u_i, Xb)  = -0.7926                        Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------------
          productivity |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------------+----------------------------------------------------------------
          1.treatgroup |          0  (omitted)
                       |
                  year |
                 2014  |   14.99192   1.075324    13.94   0.000     12.88305     17.1008
                 2015  |   29.38521   1.361145    21.59   0.000     26.71579    32.05463
                       |
       treatgroup#year |
               1 2014  |   -8.37968   1.236145    -6.78   0.000    -10.80395   -5.955409
               1 2015  |  -4.838001   1.236083    -3.91   0.000     -7.26215   -2.413851
                       |
    capital_per_worker |    .318596   .0091791    34.71   0.000     .3005944    .3365976
             graduates |   .0944828   .0723829     1.31   0.192    -.0474712    .2364368
                 _cons |  -2.767459   24.26562    -0.11   0.909    -50.35608    44.82116
    -------------------+----------------------------------------------------------------
               sigma_u |  34.553212
               sigma_e |  13.461979
                   rho |   .8682144   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------
    F test that all u_i=0: F(999, 1994) = 7.01                   Prob > F = 0.0000
    Have I coded it right?
    Why the two variables are negative for TREATMENTxYEARS?
    Can I conclude something about the common trends assumption?

    Thank you for your time, I'm sorry if the question is basic but I'm new to Stata.
    Last edited by Stefano Scibilia; 05 Apr 2019, 13:01. Reason: Panel Data, Difference in Difference, Output Interpretation, Pre-Treatment Periods

  • #2
    You coded correctly. You're just having trouble interpreting the results. You are getting confused because you think that, for example, the coefficient for 1.treatgroup#2015.year in the first model refers to the same thing as 1.treatgroup#2015.year in the second model. But those are two very different things. The first is the difference, within the 1.treatgroup observations, between year 2015 and year 2014. But in the second one, it is the difference within that same group between year 2015 and year 2013! So the implication is that within the 1.treatgroup group, the expected productivity is highest in 2013, and lower in 2014 and 2015. Apparently in the second model, it is even lower in 2014 than in 2015. And in the first model, you get the same conclusion: 1.treatgroup#2015.year is positive because expected productivity is higher in 2015 than in 2014.


    I don't think you have enough pre-treatment observations to draw any conclusions about common trends here: there are only two such time points.

    Comment


    • #3
      Thank you very much Clyde for the explanation!

      So if I understood correctly by adding the second pre-treatment year 2013 in the second model, we get a picture in which the productivity, for the treatment group, has undergo a relative decline in growth in 2014 with respect to the control group and then in 2015 after treatment the productivity relatively increased but the difference with control remained lower than in 2013.

      Comment


      • #4
        That's right.

        Comment

        Working...
        X