<p>The easiest way to motivate a regression setup from a treatment effects perspective is to assume a constant treatment effect.</p>
<p>In the DID setup, there are two time periods and two groups. One group is never treated. The other group is treated in period 2 only. <span class="math-container">$D_i = 1$</span> for treated and <span class="math-container">$D_i=0$</span> for non-treated.</p>
<p>Let the causal effect of interest be defined as the causal effect in time period <span class="math-container">$t=2$</span> which in counterfactual notation I define as</p>
<p><span class="math-container">$$\tau_i := Y_{i2}(1) - Y_{i2}(0),$$</span></p>
<p>I assume it to be a constant</p>
<p><span class="math-container">$$\forall i: \ \ \tau_i = \tau.$$</span></p>
<p>Also, I assume</p>
<p><span class="math-container">\begin{align}
Y_{it}(0) &amp;= \alpha_i + \theta_t + \epsilon_{it}, \\[8pt]
Y_{i1}(1) &amp;= Y_{i1}(0).
\end{align}</span></p>
<p>And finally, I use the assumption that</p>
<p><span class="math-container">\begin{align} 
Y_{it} &amp;= D_iY_{it}(1) + (1-D_i)Y_{it}(0)  \\[8pt]
&amp;=Y_{it}(0)  + D_i(Y_{it}(1) - Y_{it}(0)) \\[8pt]
&amp;=\alpha_i + \theta_t + \tau D_i \mathbf{1}[t&gt;1] + \epsilon_{it},
\end{align}</span></p>
<p>which should be pretty close to what you are asking for (but a little hard to know given your confusing notation - see comments).</p>

CC BY-SA 4.0
2024-10-26T18:33:37.630Z
Thanks for your answer! On the lecture notes it says in the 2x2 model $\alpha_i$ is simply $D_i$ and $\theta_i$ is simply the Post dummy. I'll see if everything checks out!
Nicolas Torres
CC BY-SA 4.0
2024-10-26T19:50:36.417Z
Yes, that is also what I guessed from your equation: $y_{it}=\beta_0 + \beta_1 \alpha_i + \beta_2 \theta_t + \beta_3 \theta_t \alpha_i + \epsilon_{it}$. However, this is, in my opinion, inconsistent with the equation $Y_{it}^{0} = \alpha_i + \theta_t + \epsilon_{it}$, where they are used - as I read the equation - not as dummies but rather as individual and time-specific fixed effects. But, I chose not to invest time elaborating on this since it would be guesswork in the absence of the motivating lecture note.
Jesper Hybel
CC BY-SA 4.0
2024-10-26T12:53:18.690Z
2024-10-26T12:53:18.690Z
Jesper Hybel
<p>I'm given this equation which corresponds to the assumption of parallel trends:</p>
<p><span class="math-container">$Y_{it}^{0} = \alpha_i + \theta_t + \epsilon_{it}$</span></p>
<p>I need to prove the following diff-in-diff model specification</p>
<p><span class="math-container">$y_{it}=\beta_0 + \beta_1 \alpha_i + \beta_2 \theta_t + \beta_3 \theta_t \alpha_i + \epsilon_{it}$</span></p>
<p>I understand how diff-in-diff works, intuition tells me <span class="math-container">$\alpha$</span> should kind of capture the group efect (treatment vs control group) and <span class="math-container">$\theta$</span> should kind of capture the time effect (pre vs post treatment period).</p>
<p>But I have no idea how the first simple looking equation can become this longer diff-in-diff equation. I would appreciate any help.</p>

CC BY-SA 4.0
2024-10-26T10:52:28.160Z
It cannot. There is no way you derive the second equation without a definition of $Y_{it}^1$ and an equation that relates $Y_{it}^0$ and $Y_{it}^1$ to $Y_{it}$. The latter will usually be given as $Y_{it} := D_{it}Y_{it^1} + (1-D_{it})Y_{it}^0$.
Jesper Hybel
CC BY-SA 4.0
2024-10-26T12:20:28.273Z
Also, you seem in your second equation to be using greek letters standardly used for unobserved fixed effects as dummy variables. Since this is non-standard notation I would advise you to be clear about how you intend your different variables to be defined.
Jesper Hybel
<econometrics><regression><difference-in-difference><model>
Prove this equivalence of equations on the diff-in-diff model
Nicolas Torres
# Prove this equivalence of equations on the diff-in-diff model

(Asked by: username_0 on 2024-10-25)

I'm given this equation which corresponds to the assumption of parallel trends:

$Y\_{it}^{0} = \alpha\_i + \theta\_t + \epsilon\_{it}$

I need to prove the following diff-in-diff model specification

$y\_{it}=\beta\_0 + \beta\_1 \alpha\_i + \beta\_2 \theta\_t + \beta\_3 \theta\_t \alpha\_i + \epsilon\_{it}$

I understand how diff-in-diff works, intuition tells me $\alpha$ should kind of capture the group efect (treatment vs control group) and $\theta$ should kind of capture the time effect (pre vs post treatment period).

But I have no idea how the first simple looking equation can become this longer diff-in-diff equation. I would appreciate any help.

**Tags:** econometrics, regression, difference-in-difference, model
> **Comments:**
> **username_1**: It cannot. There is no way you derive the second equation without a definition of $Y_{it}^1$ and an equation that relates $Y_{it}^0$ and $Y_{it}^1$ to $Y_{it}$. The latter will usually be given as $Y_{it} := D_{it}Y_{it^1} + (1-D_{it})Y_{it}^0$.  
> **username_1**: Also, you seem in your second equation to be using greek letters standardly used for unobserved fixed effects as dummy variables. Since this is non-standard notation I would advise you to be clear about how you intend your different variables to be defined.  

---

## 1 answers

### Answer by username_1 on 2024-10-26. Score: 3 | Accepted answer

The easiest way to motivate a regression setup from a treatment effects perspective is to assume a constant treatment effect.

In the DID setup, there are two time periods and two groups. One group is never treated. The other group is treated in period 2 only. $D\_i = 1$ for treated and $D\_i=0$ for non-treated.

Let the causal effect of interest be defined as the causal effect in time period $t=2$ which in counterfactual notation I define as

$$\tau\_i := Y\_{i2}(1) - Y\_{i2}(0),$$

I assume it to be a constant

$$\forall i: \ \ \tau\_i = \tau.$$

Also, I assume

\begin{align}
Y\_{it}(0) &= \alpha\_i + \theta\_t + \epsilon\_{it}, \\[8pt]
Y\_{i1}(1) &= Y\_{i1}(0).
\end{align}

And finally, I use the assumption that

\begin{align}
Y\_{it} &= D\_iY\_{it}(1) + (1-D\_i)Y\_{it}(0) \\[8pt]
&=Y\_{it}(0) + D\_i(Y\_{it}(1) - Y\_{it}(0)) \\[8pt]
&=\alpha\_i + \theta\_t + \tau D\_i \mathbf{1}[t>1] + \epsilon\_{it},
\end{align}

which should be pretty close to what you are asking for (but a little hard to know given your confusing notation - see comments).

> **Comments:**
> **username_0**: Thanks for your answer! On the lecture notes it says in the 2x2 model $\alpha_i$ is simply $D_i$ and $\theta_i$ is simply the Post dummy. I'll see if everything checks out!  
> **username_1**: Yes, that is also what I guessed from your equation: $y_{it}=\beta_0 + \beta_1 \alpha_i + \beta_2 \theta_t + \beta_3 \theta_t \alpha_i + \epsilon_{it}$. However, this is, in my opinion, inconsistent with the equation $Y_{it}^{0} = \alpha_i + \theta_t + \epsilon_{it}$, where they are used - as I read the equation - not as dummies but rather as individual and time-specific fixed effects. But, I chose not to invest time elaborating on this since it would be guesswork in the absence of the motivating lecture note.  

---

