# Difference-in-differences with two treatments

I have two groups.

Group 1 received intervention A and Group 2 received intervention B. I'm interested in seeing if intervention A is more effective than intervention B. People cannot be enrolled in both interventions at the same time.

Am I able to use difference-in-differences to compare the two interventions, or would I need to include a third group where the people receive no intervention (control group)? What I have are the dates in which someone enrolled in their respective intervention and the pre-enrollment and post-enrollment outcomes. The outcome was measured every 3-6 months pre-enrollment and every 3-6 months post-enrollment.

Also, since people can enroll in any of the interventions at different times, I would like to standardize the time dimension as the number of days before and after enrollment into the intervention. If I were to include a third group, how would I standardize time since there is no enrollment?

• Welcome. First, do you have panel data? If so, then are you working with quarterly (biannual) observations over many years? Second, do individuals start treatment at different times? Dec 29, 2022 at 2:32
• Thanks. I have panel data, but it's unbalanced; measurements are taken every 3 to 6 months over many years. Individuals start treatment at different times. Since people tend to stay in their respective program for at least one year, I plan on looking at observations 365 days before program enrollment and 365 days after program enrollment. Dec 29, 2022 at 12:20

Am I able to use difference-in-differences to compare the two interventions, or would I need to include a third group where the people receive no intervention (control group)?

In general, a baseline group of individuals that never experience either of the two interventions is ideal. And including the two intervention groups in a single regression equation will make it easier to assess for differences between the two treatments.

The outcome was measured every 3-6 months pre-enrollment and every 3-6 months post-enrollment.

It appears individuals may opt into either of the two interventions, but not both. The interventions are therefore disjoint, so there's no reason to interact the two treatment variables. Note also that the "post-periods" vary across individuals, and so you should use the more general framework for difference-in-differences testing. Review the top answer here to help you get going.

Also, since people can enroll in any of the interventions at different times, I would like to standardize the time dimension as the number of days before and after enrollment into the intervention.

You didn't say why you're doing this, but if I may wager a guess, it's probably to do some sort of event study analysis and/or coefficient plotting. This makes sense given the context. To do this correctly, each treated individual is some number of days before or after their first day of treatment. Most refer to this practice as "centering" the treated units around the immediate intervention period.

If I were to include a third group, how would I standardize time since there is no enrollment?

You don't.

In settings with binary (i.e., 0/1) treatments, the controls remain consistently 0 for all days pre- and post-intervention. We have no reliable way to determine when the unexposed group would have entered into treatment. To see this visually, review my answer here. Note the fake data frame used for illustrative purposes; the first item (unit) is 0 in all periods.

• Thank you, very helpful. When using centering, does the generalized difference-in-differences estimator need to be used, or can I use the non generalized estimator? Jan 4 at 12:02
• In settings where the timing of treatment administration differs across units, you must use the generalized difference-in-differences estimator. Mar 18 at 5:19