# Difference-in-Differences

I have been reading up on the diff-in-diff estimator (following MHE). However, my lecturer said something that confused me:

Say I have panel data of hospitals in low-income neighbourhoods and a variable for patient's health outcome. Now a new policy is introduced such that some hospitals are privatised during the sample period while the rest of the hospitals are privatised at some later date. My initial thought was to consider the hospitals who received converted in the sample period as the 'treatment group' and hospitals who converted later as the 'control group'. And then follow the canonical approach and compares pre- and post differences in health outcomes. However, the problem is that not every hospital in the 'treatment group' converted at the same time. And apparently this means that diff-in-diff is not suitable.

However, I came across this post which makes it sound as if it is possible to use diff-in-diff. In the above link the suggested answer is to estimate:

$Y_{st} = \alpha + \gamma_s\text{Treat}_s + \lambda (\text{year dummy}_t) + \delta (\text{Treat}_s \times d_t ) + \epsilon_{st}$

In my case $\text{Treat}_s$ would be 1 if the hospital was privatised in the sample period. $d_{t} = 1$ if the observation occurs after conversion. Thus the interaction term is 1 for the treatment-units in the post-treatment period.

Although the OP in the above link doesn't have units receiving treatment at different times. My main source of confusion is how to think about the 'post-treament' dummy in cases such as this.

• Welcome CV, Kronecker! You have the start of a good question here, but it would be very much improved if you could related the pertinent details from your link. You can make such improvements by clicking the "edit" link in the lower left. As a rule, questions and answers on CV should not require visitors to go 'read up' elsewhere in order to be fully understood (although links to further or supporting info, or even simply citations are welcome). – Alexis Dec 6 '17 at 19:46
• Thank you Alexis. I have made the recommended changes, hope it clarifies things. – Kronecker Dec 6 '17 at 19:58

You want to have a regression with a dummy for early converters (always either 0 or 1 for each hospital, i.e, constant within hospital), a set of time dummies for the periods, and a policy dummy D that is 1 for hospitals and time periods after conversion, and zero otherwise. The coefficient on that D is the DID parameter and replaces the treated x post interaction. This does impose the restriction that the policy has the same effect in every period. See Section 3 in Jeff Wooldridge's NBER SI lecture notes for more on this.

You will also need to think about how to cluster the standard errors. Doing it at hospital level makes sense if you have sufficient data.

• Many thanks for the reply. Just a follow-up regarding the D dummy: with "time periods after conversion", do you mean a variable such as a dummy that is 1 if the observation occurs after conversion (since every hospital converts at some point this would be 1 for the control group converters as well) or do you mean length of time after conversion? – Kronecker Dec 6 '17 at 21:55
• @Kronecker I meant the first one, with the caveat that later converters would always have D=0. You may have to get tricky with the sample by focusing your analysis on a period where later converters have not yet converted or by omitting the late converter hospitals once they convert from the control group. Without knowing more about this setting, I cannot offer good advice here. – Dimitriy V. Masterov Dec 6 '17 at 22:03
• Thank you so much Dimitriy, I think I am starting to understand. Very briefly, this is the example we went through: We have data from 1990-2010. In 1993 there was a policy change that allowed for private hospitals. In 2000 there was another policy change that affected the private hospitals so we dropped observations after 2000. However, some hospitals converted after 2000, so we used them as our control group (while restricting the sample period:1990-2000). So as I have data on early converters and whether the observation occurred after conversion, your approach should work? – Kronecker Dec 6 '17 at 22:27
• @Kronecker Yes, I believe so. – Dimitriy V. Masterov Dec 6 '17 at 22:46