<p>I'm not understanding-- could you please talk a little about why both can't be used here? It's been a while since <a href="https://scholarworks.gsu.edu/political_science_theses/85/" rel="nofollow noreferrer">I've really worked with</a> DD, but as far as I'm aware, there's not real metric you can point to. Unlike say in synthetic controls, where the <span class="math-container">$RMSE$</span> is typically a candidate for the quality of the pre-intervention counterfactual, DD has no such metric (again, as far as I'm able to remember). Why not use both comparison groups, though?</p>
<p><strong>Strictly speaking</strong>, if you wanted to go wild, there are computer science/engineering algorithms that do this sort of thing (<a href="https://rtavenar.github.io/blog/dtw.html" rel="nofollow noreferrer">dynamic time warping</a>, others), but this is pretty much never done in DD/econ and would be a little like taking a nuclear bomb to a high school bully. If I were you, I would make strong conceptual arguments for the merits of both control groups and compare the statistical results you get and what possible impact the different groups might have.</p>

CC BY-SA 4.0
2023-01-31T01:04:42.410Z
Thnak yyou for your comment, I edited my question to clarify the situation and why I cannot use both groups.
Oalvinegro
CC BY-SA 4.0
2023-01-27T20:30:41.153Z
I built on your answer, @Jared Greathouse. I liked that you mentioned the synthetic control method!
bajun65537
CC BY-SA 4.0
2023-01-27T19:51:14.770Z
2023-01-27T19:51:14.770Z
Jared Greathouse
<h2>Background</h2>
<p>The typical thing to do is visually inspect the pre-treatment trends for the control and treatment groups. Whether you want it or not, you might be biased when looking at the visual representation. I'd argue that an average university student would claim that neither control 1 nor 2 pass the &quot;parallel trend&quot; assumption. At the same time, many researchers do a more relaxed visual inspection, given that you explain the theory and arguments that support the pre-treatment parallel trends. This, of course, causes some friction, e.g. look at Kearney and Levine (2015) and Jaeger, Joyce and Kaestner (2018), and then again <a href="https://data.nber.org/data-appendix/w19795/KL_Response_to_JJK-JBES-July_2018_FINAL.pdf" rel="nofollow noreferrer">Kearney and Levine (2018)</a>.</p>
<h2>Mathematical methodology</h2>
<p>It is possible to test for the parallel trend assumption more concisely. <a href="https://stats.stackexchange.com/questions/160359/difference-in-difference-method-how-to-test-for-assumption-of-common-trend-betw">This</a> answer provides a very nice intro on how to do it.</p>
<blockquote>
<p>A formal test which is also suitable for multivalued treatments or several groups is to interact the treatment variable with time dummies. Suppose you have 3 pre-treatment periods and 3 post-treatment periods, you would then regress
<span class="math-container">$$y_{it} = \lambda_i + \delta_t + \beta_{-2}D_{it} + \beta_{-1}D_{it} + \beta_1 D_{it} + \beta_2 D_{it} + \beta_3 D_{it} + \epsilon_{it}$$</span>
where <span class="math-container">$y$</span> is the outcome for individual <span class="math-container">$i$</span> at time <span class="math-container">$t$</span>, <span class="math-container">$λ$</span> and <span class="math-container">$δ$</span> are individual and time-fixed effects (this is a generalized way of writing down the diff-in-diff model which also allows for multiple treatments or treatments at different times).</p>
<p>The idea is the following. You include the interactions of the time
dummies and the treatment indicator for the first two pre-treatment
periods and you leave out the one interaction for the last
pre-treatment period due to the dummy variable trap. Also now all the
other interactions are expressed relative to the omitted period which
serves as the baseline. If the outcome trends between treatment and
control group are the same, then <span class="math-container">$β_{−2}$</span>
and <span class="math-container">$β_{-1}$</span>
should be insignificant, i.e. the difference in differences is not significantly different between the two groups in the pre-treatment period.</p>
</blockquote>
<h2>What to do?</h2>
<p>Always present a graph showing the levels of the two series you are comparing over time, not just their difference. The general rule of thumb is to prefer DiD on a matched sample for this reason – if you can make the levels more similar, readers will be more willing to think the trends will be too.</p>
<p>Kahn-Lane and Lang (2019) on the &quot;failure to reject parallel trends in the pre-treatment data&quot;.</p>
<blockquote>
<p>Increasingly, researchers point to a statistically insignificant pre-trend test to argue that they therefore accept the null hypothesis of parallel trends. There is no doubt that testing for a common pre-trend plays an important role in validating the parallel trends assumption underlying DiD. However, failing to reject that outcomes in years prior to treatment exhibit parallel trends, should not be confused with establishing the validity of the parallel trends counterfactual. Moreover, clearly, not rejecting the null hypothesis is not equivalent to confirming it.</p>
</blockquote>
<p>But also, and in my opinion, more importantly, Kahn-Lane and Lang (2019) note that:</p>
<blockquote>
<p>Authors should perform a thorough comparison of the differences between the treatment and control groups including demographic composition, other factors that could have differentially affected each group, and comparison of trends as far back as possible .</p>
</blockquote>
<h2>Relax parallel trend with Synthetic Control Method</h2>
<p>Assuming that the number of pre-intervention periods is large enough, it is likely that unobserved and time varying confounders have similar effects on both treated unit and synthetic counterpart (Kreif et al., 2016). In your case, the synthetic control method might improve the DiD approach by relaxing the parallel trends assumption. However, the longer the pre-treatment data, the better. Moreover, with the DiD there often exists a sort of ambiguity when it comes to the choice of control group as argued by Card (1989) - in case of SCM it is being chosen by a data-driven method.</p>
<p>If you want to read more on Synthetic Control Method, I highly recommend going to the source, i.e. Abadie et al. (2010), Abadie et al. (2011) and Abadie et al. (2015). The application of the SCM for estimating treatment effects in panel settings has become very popular among researchers interested in comparative case studies. Since then, the SCM was applied in various fields and to diverse research topics, establishing an intuitive alternative to creating counterfactuals. According to Athey and Imbens (2017):</p>
<blockquote>
<p>Synthetic Control Method is arguably the most important innovation in the policy evaluation
literature in the last 15 years.</p>
</blockquote>
<p>Therefore, using SCM as the robustness check for DiD is more than justified.</p>

CC BY-SA 4.0
2023-01-31T01:05:59.693Z
Thank you for your comment, I edited my question to clarify that I'm not looking for test the parallel trends
Oalvinegro
CC BY-SA 4.0
2023-01-27T20:28:45.673Z
2023-01-27T20:34:29.343Z
2023-01-27T20:34:29.343Z
bajun65537
<p>Suppose in a diff-in-diff problem, I have two control groups, but just one can be used as comparison, so I want to check which of them provides a better comparison. My idea is to compare the parallel trends in the pre-treatment period. The one who with the closer trend (even if none of them are strictly parallel) will be chosen.</p>
<p>E.g:</p>
<p><a href="https://i.sstatic.net/r4p2T.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/r4p2T.png" alt="enter image description here" /></a></p>
<p>How could I, mathematically, compare groups 1 and 2 to check which one provides the &quot;more parallel&quot; trend to the treatment group?</p>
<hr />
<p><strong>EDIT:</strong></p>
<p>Jus to be more specific, I don't want to TEST for the parallel trends. I want to compare two trends, and if if none of them are good enough, I want to decide which one is &quot;more parallel&quot;. The motivation for this is <a href="https://www.aeaweb.org/articles?id=10.1257/aer.20190159" rel="nofollow noreferrer">this paper</a>. It's explained in details in <a href="https://matheusfacure.github.io/python-causality-handbook/25-Synthetic-Diff-in-Diff.html" rel="nofollow noreferrer">this post</a>. They are estimating diff-in-diff but the control group is composed by non-treated units weighted by similarity to the treated units.</p>
<p>To check the results they suggest comparing one series (classical control group) with another series (their approach) which is the same group weights, so estimated via WLS. Weighting can improve the results, but there are specific situations in which just homogenous weights can be better. They metion this, but do not provide a way to compare.</p>

CC BY-SA 4.0
2023-02-03T10:54:48.540Z
Can you point me to where the authors decide which trend is more parallel? I've skimmed through the paper and it appears that the authors improve the method I've mentioned to you. It appears Athey and Imbens were excited for the synthetic control method (SCM) back in 2017 and together with their colleagues decided to further improve this estimator for causal effects with panel data. I am still not entirely sure what is your question here.
bajun65537
CC BY-SA 4.0
2023-02-03T12:11:43.910Z
On a separate note, I think the other resource you've shared 'Causal Inference for The Brave and True' is one of the best I've seen. Python code supporting every chapter is extremely useful.
bajun65537
CC BY-SA 4.0
2023-02-08T00:57:06.130Z
@bajun65537 you are right, they came up with an extensions for the SCM. But this extension allows for fit the synthetic control in trends instead of level. In the end they fit a new series and do DID. Basically they do Diff-in-Diff with weighted least squares. So we need to now if this weighted series is really superior to a series with homogenous weights. They do not mention n the paper how to compare, but mention that users shoud take a look on both to decide
Oalvinegro
<regression><difference-in-difference><causality><causal-inference><treatment-effect>
Diff-in-diff with two control groups: compare parallel trends
Oalvinegro
# Diff-in-diff with two control groups: compare parallel trends

(Asked by: username_0 on 2023-01-27)

Suppose in a diff-in-diff problem, I have two control groups, but just one can be used as comparison, so I want to check which of them provides a better comparison. My idea is to compare the parallel trends in the pre-treatment period. The one who with the closer trend (even if none of them are strictly parallel) will be chosen.

E.g:

[![enter image description here](https://i.sstatic.net/r4p2T.png)](https://i.sstatic.net/r4p2T.png)

How could I, mathematically, compare groups 1 and 2 to check which one provides the "more parallel" trend to the treatment group?

---

**EDIT:**

Jus to be more specific, I don't want to TEST for the parallel trends. I want to compare two trends, and if if none of them are good enough, I want to decide which one is "more parallel". The motivation for this is [this paper](https://www.aeaweb.org/articles?id=10.1257/aer.20190159). It's explained in details in [this post](https://matheusfacure.github.io/python-causality-handbook/25-Synthetic-Diff-in-Diff.html). They are estimating diff-in-diff but the control group is composed by non-treated units weighted by similarity to the treated units.

To check the results they suggest comparing one series (classical control group) with another series (their approach) which is the same group weights, so estimated via WLS. Weighting can improve the results, but there are specific situations in which just homogenous weights can be better. They metion this, but do not provide a way to compare.

**Tags:** regression, difference-in-difference, causality, causal-inference, treatment-effect
> **Comments:**
> **username_1**: Can you point me to where the authors decide which trend is more parallel? I've skimmed through the paper and it appears that the authors improve the method I've mentioned to you. It appears Athey and Imbens were excited for the synthetic control method (SCM) back in 2017 and together with their colleagues decided to further improve this estimator for causal effects with panel data. I am still not entirely sure what is your question here.  
> **username_1**: On a separate note, I think the other resource you've shared 'Causal Inference for The Brave and True' is one of the best I've seen. Python code supporting every chapter is extremely useful.  
> **username_0**: @bajun65537 you are right, they came up with an extensions for the SCM. But this extension allows for fit the synthetic control in trends instead of level. In the end they fit a new series and do DID. Basically they do Diff-in-Diff with weighted least squares. So we need to now if this weighted series is really superior to a series with homogenous weights. They do not mention n the paper how to compare, but mention that users shoud take a look on both to decide  

---

## 2 answers

### Answer by username_2 on 2023-01-27. Score: 1

I'm not understanding-- could you please talk a little about why both can't be used here? It's been a while since [I've really worked with](https://scholarworks.gsu.edu/political_science_theses/85/) DD, but as far as I'm aware, there's not real metric you can point to. Unlike say in synthetic controls, where the $RMSE$ is typically a candidate for the quality of the pre-intervention counterfactual, DD has no such metric (again, as far as I'm able to remember). Why not use both comparison groups, though?

**Strictly speaking**, if you wanted to go wild, there are computer science/engineering algorithms that do this sort of thing ([dynamic time warping](https://rtavenar.github.io/blog/dtw.html), others), but this is pretty much never done in DD/econ and would be a little like taking a nuclear bomb to a high school bully. If I were you, I would make strong conceptual arguments for the merits of both control groups and compare the statistical results you get and what possible impact the different groups might have.

> **Comments:**
> **username_1**: I built on your answer, @Jared Greathouse. I liked that you mentioned the synthetic control method!  
> **username_0**: Thnak yyou for your comment, I edited my question to clarify the situation and why I cannot use both groups.  

---

### Answer by username_1 on 2023-01-27. Score: 1

## Background

The typical thing to do is visually inspect the pre-treatment trends for the control and treatment groups. Whether you want it or not, you might be biased when looking at the visual representation. I'd argue that an average university student would claim that neither control 1 nor 2 pass the "parallel trend" assumption. At the same time, many researchers do a more relaxed visual inspection, given that you explain the theory and arguments that support the pre-treatment parallel trends. This, of course, causes some friction, e.g. look at Kearney and Levine (2015) and Jaeger, Joyce and Kaestner (2018), and then again [Kearney and Levine (2018)](https://data.nber.org/data-appendix/w19795/KL_Response_to_JJK-JBES-July_2018_FINAL.pdf).

## Mathematical methodology

It is possible to test for the parallel trend assumption more concisely. [This](https://stats.stackexchange.com/questions/160359/difference-in-difference-method-how-to-test-for-assumption-of-common-trend-betw) answer provides a very nice intro on how to do it.

> A formal test which is also suitable for multivalued treatments or several groups is to interact the treatment variable with time dummies. Suppose you have 3 pre-treatment periods and 3 post-treatment periods, you would then regress
> $$y\_{it} = \lambda\_i + \delta\_t + \beta\_{-2}D\_{it} + \beta\_{-1}D\_{it} + \beta\_1 D\_{it} + \beta\_2 D\_{it} + \beta\_3 D\_{it} + \epsilon\_{it}$$
> where $y$ is the outcome for individual $i$ at time $t$, $λ$ and $δ$ are individual and time-fixed effects (this is a generalized way of writing down the diff-in-diff model which also allows for multiple treatments or treatments at different times).
>
> The idea is the following. You include the interactions of the time
> dummies and the treatment indicator for the first two pre-treatment
> periods and you leave out the one interaction for the last
> pre-treatment period due to the dummy variable trap. Also now all the
> other interactions are expressed relative to the omitted period which
> serves as the baseline. If the outcome trends between treatment and
> control group are the same, then $β\_{−2}$
> and $β\_{-1}$
> should be insignificant, i.e. the difference in differences is not significantly different between the two groups in the pre-treatment period.

## What to do?

Always present a graph showing the levels of the two series you are comparing over time, not just their difference. The general rule of thumb is to prefer DiD on a matched sample for this reason – if you can make the levels more similar, readers will be more willing to think the trends will be too.

Kahn-Lane and Lang (2019) on the "failure to reject parallel trends in the pre-treatment data".

> Increasingly, researchers point to a statistically insignificant pre-trend test to argue that they therefore accept the null hypothesis of parallel trends. There is no doubt that testing for a common pre-trend plays an important role in validating the parallel trends assumption underlying DiD. However, failing to reject that outcomes in years prior to treatment exhibit parallel trends, should not be confused with establishing the validity of the parallel trends counterfactual. Moreover, clearly, not rejecting the null hypothesis is not equivalent to confirming it.

But also, and in my opinion, more importantly, Kahn-Lane and Lang (2019) note that:

> Authors should perform a thorough comparison of the differences between the treatment and control groups including demographic composition, other factors that could have differentially affected each group, and comparison of trends as far back as possible .

## Relax parallel trend with Synthetic Control Method

Assuming that the number of pre-intervention periods is large enough, it is likely that unobserved and time varying confounders have similar effects on both treated unit and synthetic counterpart (Kreif et al., 2016). In your case, the synthetic control method might improve the DiD approach by relaxing the parallel trends assumption. However, the longer the pre-treatment data, the better. Moreover, with the DiD there often exists a sort of ambiguity when it comes to the choice of control group as argued by Card (1989) - in case of SCM it is being chosen by a data-driven method.

If you want to read more on Synthetic Control Method, I highly recommend going to the source, i.e. Abadie et al. (2010), Abadie et al. (2011) and Abadie et al. (2015). The application of the SCM for estimating treatment effects in panel settings has become very popular among researchers interested in comparative case studies. Since then, the SCM was applied in various fields and to diverse research topics, establishing an intuitive alternative to creating counterfactuals. According to Athey and Imbens (2017):

> Synthetic Control Method is arguably the most important innovation in the policy evaluation
> literature in the last 15 years.

Therefore, using SCM as the robustness check for DiD is more than justified.

> **Comments:**
> **username_0**: Thank you for your comment, I edited my question to clarify that I'm not looking for test the parallel trends  

---

