17
$\begingroup$

When I estimate a difference in differences model with two time periods, the equivalent regression model would be

a. $Y_{ist} = \alpha +\gamma_s*Treatment + \lambda d_t + \delta*(Treatment*d_t)+ \epsilon_{ist}$

  • where $Treatment$ is a dummy which is equal to 1 if the observation is from the treatment group
  • and $d$ is a dummy which is equal to 1 in the time period after the treatment occured

Thus the equation takes the following values.

  • Control group, before treatment: $\alpha$
  • Control group, after treatment: $\alpha +\lambda$
  • Treatment group, before treatment: $\alpha +\gamma$
  • Treatment group, after treatment: $\alpha+ \gamma+ \lambda+ \delta$

Hence, in a two period model the difference in differences estimate is $\delta$.

But what happens concerning $d_t$ if I have more than one pre and post treatment period? Do I still use a dummy that indicates whether a year is before or after the treatment?

Or do I add year dummies instead without specifying whether each year belong to the pre or post treatment period? Like this:

b. $Y_{ist} = \alpha +\gamma_s*Treatment + yeardummy + \delta*(Treatment*d_t)+ \epsilon_{ist}$

Or can I include both (i.e $yeardummy +\lambda d_t$)?

c. $Y_{ist} = \alpha +\gamma_s*Treatment + yeardummy + \lambda d_t + \delta*(Treatment*d_t)+ \epsilon_{ist}$

In conclusion, how do I specify a difference in differences model with multiple time periods (a,b or c)?

$\endgroup$
  • 1
    $\begingroup$ You generally use model b. Notice that in model c, $d_t$ will be perfectly collinear with the year dummies, so that model can't be estimated. $\endgroup$ – standard_error Jan 17 '14 at 12:28
  • $\begingroup$ It would be great if you could explain why b is used generally. Maybe give some references, or just give a 2 sentence explanation. $\endgroup$ – mpiktas Jan 17 '14 at 12:51
  • $\begingroup$ and in model b. could you add a continuous variable for year instead of dummies? How would the interpretation of the coefficients differ in those cases? $\endgroup$ – user71597 Mar 20 '15 at 16:22
17
$\begingroup$

The typical way to estimate a difference in differences model with more than two time periods is your proposed solution b). Keeping your notation you would regress $$Y_{ist} = \alpha +\gamma_s (\text{Treatment}_s) + \lambda (\text{year dummy}_t) + \delta D_{st} + \epsilon_{ist}$$ where $D_t \equiv \text{Treatment}_s\cdot d_t$ is a dummy variable which equals one for treatment units $s$ in the post-treatment period ($d_t = 1$) and is zero otherwise. Note that this is a more general formulation of the difference in differences regression which allows for different timings of the treatment for different treated units.

As was pointed out correctly in the comments your proposed solution c) does not work out due to collinearity with the time dummies and the dummy for the post-treatment period. However, a slight variant of this turns out to be a robustness check. Let $\gamma_{s0}$ and $\gamma_{s1}$ be two sets of dummy variables for each control unit $s0$ and each treated unit $s1$, respectively, then interacting the dummies for the treated units with the time variable $t$ and regressing $$Y_{ist} = \gamma_{s0} + \gamma_{s1}t + \lambda (\text{year dummy}_t) + \delta D_{st} + \epsilon_{ist}$$ includes a unit specific time trend $\gamma_{s1}t$. When you include these unit specific time trends and the difference in differences coefficient $\delta$ does not change significantly you can be more confident about your results. Otherwise you might wonder whether your treatment effect has absorbed differences between treated units due to an underlying time trend (can happen when policies kick in at different points in time).

An example cited in Angrist and Pischke (2009) Mostly Harmless Econometrics is a labor market policy study by Besley and Burgess (2004). In their paper it happens that the inclusion of state-specific time trends kills the estimated treatment effect. Note though that for this robustness check you need more than 3 time periods.

$\endgroup$
  • $\begingroup$ A follow up since I am trying to decide if implementing this with some administrative data is appropriate: Would you say a DD approach is more valid than a CITS design if there are only 4 time points (2 pre and 2 post) in a model? Also, if I have multiple cohorts within waves of data should these be examine separately or in a unified model? Thanks. $\endgroup$ – bfoste01 Feb 24 '16 at 17:02
  • $\begingroup$ @Andy: Can you pls explain, what you mean by s0, s1, and unit-specific time trend? Assuming I have two newspapers (WPT and NYT) and WPT is my treatement group, which of them would be s0 and s1? $\endgroup$ – user3683131 Apr 12 '18 at 20:49
  • 1
    $\begingroup$ Am I right in thinking that this analysis compares the average pre and post treatment and does not account for secular trends? i.e. if d_t = 0 for all time periods before the switch point, and d_t = 1 for all time periods after, then this analysis is essentially the same as the two time periods one, except the average is taken of all the before/after time periods. Any time trends in the outcome before/after the treatment switch are ignored? I am trying to decide if a DiD model is correct for an analysis I am planning to carry out. $\endgroup$ – AP30 Mar 11 at 17:42

protected by kjetil b halvorsen Apr 12 '18 at 21:01

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.