<p>As the other answer mentioned, if the Diff-in-diff assumptions hold, it should not be a problem.</p>
<p>However, if you think selection might be invalidating your diff-in-diff assumptions, you have two routes:</p>
<ol>
<li><p>Argue that the selection is not invalidating your assumptions. For more see here: <a href="https://economics.stackexchange.com/questions/54812/is-difference-in-differences-still-valid-when-treat-or-control-is-determined-by/54815#54815">Is Difference-in-Differences still valid when treat or control is determined by subjects?</a></p>
</li>
<li><p>Try to correct the selection in the econometric specification.</p>
</li>
</ol>
<p>To do this, some options are:</p>
<ol>
<li><p>Try to add controls to the regression to ensure the assumptions work, conditional on those controls, as the other answer says.</p>
</li>
<li><p>Use matching methods in combination with diff-in-diff to make sure the assumption still holds. E.g. one short thread is here: <a href="https://economics.stackexchange.com/questions/54836/is-matching-combined-with-diff-in-diff-a-bad-idea/54846#54846">Is matching combined with Diff-in-Diff a bad idea?</a>, but there are a lot of resources on this</p>
</li>
<li><p>Try to model the selection and use a Heckman correction, but this has fallen out of fashion, has numerous problems and I would not recommend it. For more on this, see e.g. here: <a href="https://stats.stackexchange.com/questions/38853/heckman-selection-model-with-difference-in-differences-specification">https://stats.stackexchange.com/questions/38853/heckman-selection-model-with-difference-in-differences-specification</a></p>
</li>
</ol>

CC BY-SA 4.0
2023-03-27T20:22:10.750Z
Thanks, this is helpful. For matching, I need to use Propensity Score Matching, Synth Control. What else?
funcard
CC BY-SA 4.0
2023-03-27T20:29:08.397Z
Those are the main two that you can focus on, I wouldn't go with anything else on matching, unless you really want to.
BB King
CC BY-SA 4.0
2023-03-27T20:40:52.520Z
What additional methods of robutness checks (beyond PSM and Synth Control) would be necessary to ensure that nonrandom treatment assignment is not biasing the results?
funcard
CC BY-SA 4.0
2023-03-27T20:44:25.767Z
As I mentioned, there is not really anything else. But robustness checks does not just mean removing bias. In practice, a lot of it is showing bias is not really there. There are 4 broad ways to do that in the answer I linked under my very first bullet: "Is Difference-in-Differences still valid when treat or control is determined by subjects?".
BB King
CC BY-SA 4.0
2023-03-27T21:00:24.857Z
Got it. Trying to make sure I am fully clear on the next step. I'm not fully sure if the question/problem (seems to be self-selection bias problem to me) of the post you mentioned is the same as my problem. In my case, it's more like: the intervention affected only people having 3 or more children. So, I am saying that the people in this category are in treatment group, and people who don't have children are in the 'donor pool' to form a comparison group. Would you still say matching is the way forward?
funcard
CC BY-SA 4.0
2023-03-27T21:07:53.593Z
Continued: I need to ensure that I'm not just capturing different secular trends across time between units with and without (say greater than 3) children.
funcard
CC BY-SA 4.0
2023-03-27T21:08:10.117Z
You can still try matching, there's no harm trying. Robustness means showing the effects according to different approaches and still getting similar results. If a matching diff-in-diff is still showing a positive effect and your regular diff-in-diff is as well, that's better evidence. In your specific case it may be hard to reasonably match because the 2 groups may be too different and you may not fulfill the overlap assumption for matching, but that's a separate issue. For specifics you should talk to your advisor. But definitely try make sure/argue the matching assumptions hold in your case.
BB King
CC BY-SA 4.0
2023-03-27T21:14:10.597Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/144907/discussion-between-funcard-and-bb-king).
funcard
CC BY-SA 4.0
2023-03-27T19:34:36.910Z
2023-03-27T19:34:36.910Z
BB King
<p>The parallel trends assumption of Diff-in-diff is essentially an assumption that there is no selection bias. If you are curious about the parallel trends assumption, I encourage you to ask about it in a separate question.</p>
<p>In context of diff-in-diff, we may believe parallel trends is true only conditional on controls, in which case we can add in controls to the regression when we estimate the diff-in-diff.</p>
<p>Apart from diff-in-diff, there are other methods: Instrumental variables, regression discontinuity, synthetic controls, and fixed effects/first differences.</p>

CC BY-SA 4.0
2023-03-27T09:20:54.773Z
I upvoted this answer because its mostly correct, but I think the first paragraph should be bit adjusted, parallel trend does not mean there is no selection bias, that can be still present in the level of a variable but with diff-in-diff you look at differences in differences, so even if there is selection bias in the level as long as the variable behaves similarly for treated and untreated there won't be bias when you compare the changes at point of treatment
1muflon1
CC BY-SA 4.0
2023-03-27T18:28:52.817Z
Yes, I understand both the answer and the comment. I think i didn't make my question precise. I am interested in effects of a policy on an outcome. The treatment group in my case is nonrandom (hence selection bias) in the sense that it is decided before the actual treatment based on their observed covariates like income. The interventation didn't create a treatment group; the group was formed based on its characteristics. How does one address this nonrandom-assignment-led selection bias? Is DiD useful? What are alternatives if not?
funcard
CC BY-SA 4.0
2023-03-28T06:57:26.073Z
1muflon1 we may be using different terminology. I believe you are saying that, even if parallel trends holds, there can be selection into treatment in the sense that a variable can be of different levels between treated and control. Sure. I wouldn't call that "selection bias" though, because "bias" implies the point estimate has bias. At any rate, I think we both understand the math and econometrics underlying the idea.
Michael Gmeiner
CC BY-SA 4.0
2023-03-27T07:57:39.563Z
2023-03-27T07:57:39.563Z
Michael Gmeiner
<p>We know that selection bias occurs when the treatment and control groups are not comparable, leading to differences in the outcome that are not solely due to the treatment.</p>
<p>How does one address the problem due to selection bias in a diff-in-diff setting? Or is DiD not suitable for any study that faces selection bias problem? What other econometric methods can give credible causal estimates of the intervention in the above case?</p>
<p>First edit: I think i didn't make my question precise. I am interested in effects of a policy on an outcome. The treatment group in my case is nonrandom (hence selection bias) in the sense that it is decided before the actual treatment based on their observed covariates like income. The interventation didn't create a treatment group; the group was formed based on its characteristics. How does one address this nonrandom-assignment-led selection bias? Is DiD useful? What are alternatives if not?</p>

<econometrics><applied-econometrics><difference-in-difference><causality><selection-bias>
How to correct selection bias in an econometric analysis?
funcard
# How to correct selection bias in an econometric analysis?

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

We know that selection bias occurs when the treatment and control groups are not comparable, leading to differences in the outcome that are not solely due to the treatment.

How does one address the problem due to selection bias in a diff-in-diff setting? Or is DiD not suitable for any study that faces selection bias problem? What other econometric methods can give credible causal estimates of the intervention in the above case?

First edit: I think i didn't make my question precise. I am interested in effects of a policy on an outcome. The treatment group in my case is nonrandom (hence selection bias) in the sense that it is decided before the actual treatment based on their observed covariates like income. The interventation didn't create a treatment group; the group was formed based on its characteristics. How does one address this nonrandom-assignment-led selection bias? Is DiD useful? What are alternatives if not?

**Tags:** econometrics, applied-econometrics, difference-in-difference, causality, selection-bias


---

## 2 answers

### Answer by username_1 on 2023-03-27. Score: 2 | Accepted answer

As the other answer mentioned, if the Diff-in-diff assumptions hold, it should not be a problem.

However, if you think selection might be invalidating your diff-in-diff assumptions, you have two routes:

1. Argue that the selection is not invalidating your assumptions. For more see here: [Is Difference-in-Differences still valid when treat or control is determined by subjects?](https://economics.stackexchange.com/questions/54812/is-difference-in-differences-still-valid-when-treat-or-control-is-determined-by/54815#54815)
2. Try to correct the selection in the econometric specification.

To do this, some options are:

1. Try to add controls to the regression to ensure the assumptions work, conditional on those controls, as the other answer says.
2. Use matching methods in combination with diff-in-diff to make sure the assumption still holds. E.g. one short thread is here: [Is matching combined with Diff-in-Diff a bad idea?](https://economics.stackexchange.com/questions/54836/is-matching-combined-with-diff-in-diff-a-bad-idea/54846#54846), but there are a lot of resources on this
3. Try to model the selection and use a Heckman correction, but this has fallen out of fashion, has numerous problems and I would not recommend it. For more on this, see e.g. here: <https://stats.stackexchange.com/questions/38853/heckman-selection-model-with-difference-in-differences-specification>

> **Comments:**
> **username_0**: Thanks, this is helpful. For matching, I need to use Propensity Score Matching, Synth Control. What else?  
> **username_1**: Those are the main two that you can focus on, I wouldn't go with anything else on matching, unless you really want to.  
> **username_0**: What additional methods of robutness checks (beyond PSM and Synth Control) would be necessary to ensure that nonrandom treatment assignment is not biasing the results?  
> **username_1**: As I mentioned, there is not really anything else. But robustness checks does not just mean removing bias. In practice, a lot of it is showing bias is not really there. There are 4 broad ways to do that in the answer I linked under my very first bullet: "Is Difference-in-Differences still valid when treat or control is determined by subjects?".  
> **username_0**: Got it. Trying to make sure I am fully clear on the next step. I'm not fully sure if the question/problem (seems to be self-selection bias problem to me) of the post you mentioned is the same as my problem. In my case, it's more like: the intervention affected only people having 3 or more children. So, I am saying that the people in this category are in treatment group, and people who don't have children are in the 'donor pool' to form a comparison group. Would you still say matching is the way forward?  
> **username_0**: Continued: I need to ensure that I'm not just capturing different secular trends across time between units with and without (say greater than 3) children.  
> **username_1**: You can still try matching, there's no harm trying. Robustness means showing the effects according to different approaches and still getting similar results. If a matching diff-in-diff is still showing a positive effect and your regular diff-in-diff is as well, that's better evidence. In your specific case it may be hard to reasonably match because the 2 groups may be too different and you may not fulfill the overlap assumption for matching, but that's a separate issue. For specifics you should talk to your advisor. But definitely try make sure/argue the matching assumptions hold in your case.  
> **username_0**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/144907/discussion-between-username_0-and-username_1).  

---

### Answer by username_2 on 2023-03-27. Score: 4

The parallel trends assumption of Diff-in-diff is essentially an assumption that there is no selection bias. If you are curious about the parallel trends assumption, I encourage you to ask about it in a separate question.

In context of diff-in-diff, we may believe parallel trends is true only conditional on controls, in which case we can add in controls to the regression when we estimate the diff-in-diff.

Apart from diff-in-diff, there are other methods: Instrumental variables, regression discontinuity, synthetic controls, and fixed effects/first differences.

> **Comments:**
> **username_3**: I upvoted this answer because its mostly correct, but I think the first paragraph should be bit adjusted, parallel trend does not mean there is no selection bias, that can be still present in the level of a variable but with diff-in-diff you look at differences in differences, so even if there is selection bias in the level as long as the variable behaves similarly for treated and untreated there won't be bias when you compare the changes at point of treatment  
> **username_0**: Yes, I understand both the answer and the comment. I think i didn't make my question precise. I am interested in effects of a policy on an outcome. The treatment group in my case is nonrandom (hence selection bias) in the sense that it is decided before the actual treatment based on their observed covariates like income. The interventation didn't create a treatment group; the group was formed based on its characteristics. How does one address this nonrandom-assignment-led selection bias? Is DiD useful? What are alternatives if not?  
> **username_2**: username_3 we may be using different terminology. I believe you are saying that, even if parallel trends holds, there can be selection into treatment in the sense that a variable can be of different levels between treated and control. Sure. I wouldn't call that "selection bias" though, because "bias" implies the point estimate has bias. At any rate, I think we both understand the math and econometrics underlying the idea.  

---

