<blockquote>
<p>Suppose I have two cities, A and B. A has a higher crime level than B. Authorities in A don't like crimes, so they pass a law to increase the presence of police. The intervention is not unrelated to outcome, but suppose that the parallel trend assumption holds. Why can't I use DiD?</p>
</blockquote>
<p>You can run the DiD model. You just can't claim that DiD tells you what the causal effect of the law on crime is.</p>
<p>This is because you won't be able to tell if it was the dislike of crimes that lowered the crimes or intervention. Perhaps cities where authorities dislike crime will always find some way of reducing them (turning blind eyes to vigilantes, increasing funding without any law change etc, presumably those authorities were put there by elections so that means locals might be tougher on crime).</p>
<p>Although you can still run the model to just get numerical difference between treatment and control without attributing any causal effect of intervention on outcomes, although that will be unlikely of any interest to most scholars/policy makers.</p>

CC BY-SA 4.0
2022-11-03T01:45:30.667Z
but if in absence of the treatment, the growth rate in A would have been the same in B, then wouldn't it be far to say that it was the treatment and not the care about crime that was the cause of reduction?
Rainroad
CC BY-SA 4.0
2022-11-03T09:01:09.720Z
@Rainroad you can't because $\beta$ you estimate is not the average treatment effect on the treated anymore. If treatment is exogenous it just gives you a difference in outcomes between the group that could be caused by all manner of other things than the treatment. For example, as mentioned in my answer maybe what reduced crime was not the law but local vigilantes.  Endogeneity literally of treatment literally means the law was caused by something else, you don't know if its actually the law having effect or just 3rd cause causes both law and effect
1muflon1
CC BY-SA 4.0
2024-10-07T10:55:57.380Z
The question is confused.  It asks: Why can't I do DID if the parallel trend assumption is satisfied? Why do I need exogeneity?  But, the parallel trend assumption is an assumption of exogeneity.
Jesper Hybel
CC BY-SA 4.0
2022-11-02T19:44:26.980Z
2022-11-02T19:44:26.980Z
1muflon1
<p>There is nothing in the econometrics that prevent you from <em>measuring</em> the difference in the difference when the treatment is endogenous. The concern is about <em>interpreting</em> the difference in the difference.</p>
<p>Take a fully endogenous example. Many people go on a diet before they get married. They go on that diet <em>because</em> they want to look nice for their wedding. We could run a difference in difference regression of people's weight 6 months before their wedding and also on the morning of their weddings. As a control population, we could compare people of similar age, gender, but not getting married (on the same day and 6 months earlier). If we ran this regression, we would find that the difference-in-difference was negative, that the people getting married lose weight relative to the control population over the period.</p>
<p>But the marriage doesn't <em>cause</em> the weight loss. Rather, the wedding and the weight loss have a common cause. If we randomly forced unmarried people to get married today, they wouldn't be lighter than they were 6 months earlier.</p>
<p>Returning to the example of the crime, the concern is not being able to distinguish between the effect of the endogenous treatment and the other endogenous responses. The effect measured is the total effect. So the city A folks might be going out less, becoming more likely to be armed, doing daylight activities and similarly adjusting to crime, and what the DiD is attributing to the change in police is actually the change to all the endogenous changes.</p>

CC BY-SA 4.0
2022-11-02T19:33:06.583Z
Ok I see your point that we need treatment to be uncorrelated with other factors that may potentially explain the outcome variable, but why do we need it to be unrelated to the outcome at baseline as well? Returning to the example I gave, what is the problem with it?
Rainroad
CC BY-SA 4.0
2022-11-02T19:12:09.390Z
2022-11-02T20:18:32.390Z
2022-11-02T20:18:32.390Z
BKay
<p>This might help.  The policy may change either the crime being committed OR the endogenous behaviors of the people (armed, going out etc.).  There is still no way to separate out whether it is the populations endogenous characteristics OR the policy that created the change in the post event period.  For example: The policy makes people more comfortable, they go back out, leave their guns at home  AND the incentive for crime is lowered.  But, now there is a latent variable in your analysis, the opportunity for crime is higher.  So lower rates occur, but now higher events.  The hypothesis becomes ever more critical to define accurately.  Is the policy there to lower crime events?  If so, then maybe you could interpret the results... finding against the policy BECAUSE two things happen, crime falls but opportunity increases.  If the hypothesis is that the policy will reduce the incentive to commit crimes, that can't be parsed out in the interpretation; in this example, one would err and suggest that the effective policy was actually ineffective due to the endogenous relationship between the policy and the unobservable citizen behaviors.  If you work in rates, the non-linearity violates the DiD assumptions (parallel trend has been shown not to hold in non-linear DiD .. don't have the reference handy).</p>

CC BY-SA 4.0
2024-08-05T12:09:36.590Z
2024-08-05T12:09:36.590Z
glen mcdermott
<p>I don't think the answers here are quite right, or at least misleading. In difference-in-difference there is no strict exogeneity assumption. Instead, what identification relies on is the assumption of parallel trends: That is, if the treatment group would not have been treated in a counterfactual world, treatment and control group would have evolved the same.</p>
<p>If parallel trends hold, and the outcome then suddenly changes, you can be pretty sure that the change in outcome is due to the treatment - otherwise, it would have already changed before the interventation and parallel trends would be violated.</p>
<p>In fact, parallel trends allows for the presence of selection bias, so treatment assignment based on characteristics that affect the level of the outcome, as long as treatment assigntment is mean-independent of variables that affect the trend in the outcome.</p>

CC BY-SA 4.0
2024-10-07T09:18:01.830Z
2024-10-07T09:18:36.427Z
2024-10-07T09:18:36.427Z
n_arch
<p>One of the assumptions of DiD I learnt is that the treatment must be random and unrelated to the outcome. I'm a little bit confused about why we need this assumption.</p>
<p>If I look at the typical picture demonstrating how DiD works, it doesn't seem like endogeneity of treatment has any effects on how the estimation technique works. Suppose I have two cities, A and B. A has a higher crime level than B. Authorities in A don't like crimes, so they pass a law to increase the presence of police. The intervention is not unrelated to outcome, but suppose that the parallel trend assumption holds. Why can't I use DiD?</p>
<p>Is the assumption of exogeneity of treatment needed because we use linear regression to estimate the treatment effects?</p>

<econometrics><difference-in-difference>
Why do we need Exogeneity of Treatment in a Diff in Diff
Rainroad
# Why do we need Exogeneity of Treatment in a Diff in Diff

(Asked by: username_0 on 2022-11-02)

One of the assumptions of DiD I learnt is that the treatment must be random and unrelated to the outcome. I'm a little bit confused about why we need this assumption.

If I look at the typical picture demonstrating how DiD works, it doesn't seem like endogeneity of treatment has any effects on how the estimation technique works. Suppose I have two cities, A and B. A has a higher crime level than B. Authorities in A don't like crimes, so they pass a law to increase the presence of police. The intervention is not unrelated to outcome, but suppose that the parallel trend assumption holds. Why can't I use DiD?

Is the assumption of exogeneity of treatment needed because we use linear regression to estimate the treatment effects?

**Tags:** econometrics, difference-in-difference

---

## 4 answers

### Answer by username_1 on 2022-11-02. Score: 1 | Accepted answer

> Suppose I have two cities, A and B. A has a higher crime level than B. Authorities in A don't like crimes, so they pass a law to increase the presence of police. The intervention is not unrelated to outcome, but suppose that the parallel trend assumption holds. Why can't I use DiD?

You can run the DiD model. You just can't claim that DiD tells you what the causal effect of the law on crime is.

This is because you won't be able to tell if it was the dislike of crimes that lowered the crimes or intervention. Perhaps cities where authorities dislike crime will always find some way of reducing them (turning blind eyes to vigilantes, increasing funding without any law change etc, presumably those authorities were put there by elections so that means locals might be tougher on crime).

Although you can still run the model to just get numerical difference between treatment and control without attributing any causal effect of intervention on outcomes, although that will be unlikely of any interest to most scholars/policy makers.

> **Comments:**
> **username_0**: but if in absence of the treatment, the growth rate in A would have been the same in B, then wouldn't it be far to say that it was the treatment and not the care about crime that was the cause of reduction?  
> **username_1**: @Rainroad you can't because $\beta$ you estimate is not the average treatment effect on the treated anymore. If treatment is exogenous it just gives you a difference in outcomes between the group that could be caused by all manner of other things than the treatment. For example, as mentioned in my answer maybe what reduced crime was not the law but local vigilantes.  Endogeneity literally of treatment literally means the law was caused by something else, you don't know if its actually the law having effect or just 3rd cause causes both law and effect  
> **username_2**: The question is confused.  It asks: Why can't I do DID if the parallel trend assumption is satisfied? Why do I need exogeneity?  But, the parallel trend assumption is an assumption of exogeneity.  

---

### Answer by username_3 on 2022-11-02. Score: 1

There is nothing in the econometrics that prevent you from *measuring* the difference in the difference when the treatment is endogenous. The concern is about *interpreting* the difference in the difference.

Take a fully endogenous example. Many people go on a diet before they get married. They go on that diet *because* they want to look nice for their wedding. We could run a difference in difference regression of people's weight 6 months before their wedding and also on the morning of their weddings. As a control population, we could compare people of similar age, gender, but not getting married (on the same day and 6 months earlier). If we ran this regression, we would find that the difference-in-difference was negative, that the people getting married lose weight relative to the control population over the period.

But the marriage doesn't *cause* the weight loss. Rather, the wedding and the weight loss have a common cause. If we randomly forced unmarried people to get married today, they wouldn't be lighter than they were 6 months earlier.

Returning to the example of the crime, the concern is not being able to distinguish between the effect of the endogenous treatment and the other endogenous responses. The effect measured is the total effect. So the city A folks might be going out less, becoming more likely to be armed, doing daylight activities and similarly adjusting to crime, and what the DiD is attributing to the change in police is actually the change to all the endogenous changes.

> **Comments:**
> **username_0**: Ok I see your point that we need treatment to be uncorrelated with other factors that may potentially explain the outcome variable, but why do we need it to be unrelated to the outcome at baseline as well? Returning to the example I gave, what is the problem with it?  

---

### Answer by username_4 on 2024-08-05. Score: 0

This might help. The policy may change either the crime being committed OR the endogenous behaviors of the people (armed, going out etc.). There is still no way to separate out whether it is the populations endogenous characteristics OR the policy that created the change in the post event period. For example: The policy makes people more comfortable, they go back out, leave their guns at home AND the incentive for crime is lowered. But, now there is a latent variable in your analysis, the opportunity for crime is higher. So lower rates occur, but now higher events. The hypothesis becomes ever more critical to define accurately. Is the policy there to lower crime events? If so, then maybe you could interpret the results... finding against the policy BECAUSE two things happen, crime falls but opportunity increases. If the hypothesis is that the policy will reduce the incentive to commit crimes, that can't be parsed out in the interpretation; in this example, one would err and suggest that the effective policy was actually ineffective due to the endogenous relationship between the policy and the unobservable citizen behaviors. If you work in rates, the non-linearity violates the DiD assumptions (parallel trend has been shown not to hold in non-linear DiD .. don't have the reference handy).


---

### Answer by username_5 on 2024-10-07. Score: 0

I don't think the answers here are quite right, or at least misleading. In difference-in-difference there is no strict exogeneity assumption. Instead, what identification relies on is the assumption of parallel trends: That is, if the treatment group would not have been treated in a counterfactual world, treatment and control group would have evolved the same.

If parallel trends hold, and the outcome then suddenly changes, you can be pretty sure that the change in outcome is due to the treatment - otherwise, it would have already changed before the interventation and parallel trends would be violated.

In fact, parallel trends allows for the presence of selection bias, so treatment assignment based on characteristics that affect the level of the outcome, as long as treatment assigntment is mean-independent of variables that affect the trend in the outcome.


---

