<p>When <span class="math-container">$y$</span> is regressed on <span class="math-container">$D$</span> only, we have
<span class="math-container">$$\hat\beta_{ols} = \frac{\sum_{i=1}^n D_i y_i}{\sum_{i=1}^n D_i} - \frac{\sum_{i=1}^n (1-D_i)y_i}{\sum_{i=1}^n (1-D_i)},$$</span>
which can be proved using algebra. The remaining is straightforward. We have
<span class="math-container">$$ \mathrm{plim} \hat\beta_{ols} = E(y|D=1) - E(y|D=0).$$</span>
With <span class="math-container">$y = \alpha + \beta D + \gamma X + \eta(DX) + \varepsilon,\;\;$</span> where <span class="math-container">$E(\varepsilon|D,X)=0,\;\;$</span> we have
<span class="math-container">\begin{align}
  E(y|D=1) &amp;= \alpha + \beta + \gamma E(X|D=1) + \eta E(X|D=1),\\
  E(y|D=0) &amp;= \alpha + \gamma E(X|D=0),
\end{align}</span>
and thus
<span class="math-container">$$
  \mathrm{plim} \hat\beta_{ols} = \beta + \gamma [E(X|D=1) - E(X|D=0)] + \eta E(X|D=1).
$$</span></p>
<p>I've done a simulation.</p>
<pre><code>set.seed(1)
n &lt;- 100000
d &lt;- as.numeric(rnorm(n) &gt; 0)
x &lt;- 0.5*d + rnorm(n, mean=1)
# E(x|d=1)=1.5, E(x|d=0)=0.5
y &lt;- 1-0.5*d+x+2*d*x+rnorm(n)
# beta=-0.5, gamma=1, eta=2
# plim bhat(ols) = -0.5 + 1*(1.5-0.5) + 2*(1.5) = 3
</code></pre>
<p>For this, <span class="math-container">$\beta= -0.5$</span>, <span class="math-container">$\gamma = 1$</span>, <span class="math-container">$\eta=2$</span>, <span class="math-container">$E(x|d=1) = 0.5+1 = 1.5,\;\;$</span> and <span class="math-container">$E(x|d=0) = 1,\;\;$</span> so that the probability limit of the OLS estimator is <span class="math-container">$-0.5 + 1(1.5 - 1) + 2(1.5) = 3.\;\;$</span> Indeed,</p>
<pre><code>lm(y~d)

# Call:
# lm(formula = y ~ d)
#
# Coefficients:
# (Intercept)            d  
#       1.997        3.005  
</code></pre>

CC BY-SA 4.0
2022-11-27T14:08:11.880Z
2022-11-27T14:19:27.280Z
2022-11-27T14:19:27.280Z
chan1142
<p>Suppose we have the long regression</p>
<p><span class="math-container">$$ y = \alpha + \beta D + \gamma X + \varepsilon $$</span></p>
<p>but instead use the short regression</p>
<p><span class="math-container">$$ y = \alpha + \beta D + \varepsilon $$</span></p>
<p>then one can show that the OLS estimator is inconsistent and the bias depends on the covariance between <span class="math-container">$X$</span> and <span class="math-container">$Y$</span> and the covariance between <span class="math-container">$X$</span> and <span class="math-container">$D$</span></p>
<p><span class="math-container">$$ \hat{\beta}_{OLS} \overset{p}{\to} \beta + \gamma \delta $$</span></p>
<p>where <span class="math-container">$\delta$</span> is the coefficient from a regression of <span class="math-container">$X$</span> on <span class="math-container">$D$</span>. This is covered in many Econometrics classes.</p>
<p>What about the case when the long regression also includes an interaction effect (presumably capturing selection on gains)</p>
<p><span class="math-container">$$ y = \alpha + \beta D + \gamma X + \eta D \times X + \varepsilon $$</span></p>
<p>and we omit both terms from the short regression?</p>

<econometrics><regression><endogeneity>
Omitted Variable Bias with interaction terms
Papayapap
# Omitted Variable Bias with interaction terms

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

Suppose we have the long regression

$$ y = \alpha + \beta D + \gamma X + \varepsilon $$

but instead use the short regression

$$ y = \alpha + \beta D + \varepsilon $$

then one can show that the OLS estimator is inconsistent and the bias depends on the covariance between $X$ and $Y$ and the covariance between $X$ and $D$

$$ \hat{\beta}\_{OLS} \overset{p}{\to} \beta + \gamma \delta $$

where $\delta$ is the coefficient from a regression of $X$ on $D$. This is covered in many Econometrics classes.

What about the case when the long regression also includes an interaction effect (presumably capturing selection on gains)

$$ y = \alpha + \beta D + \gamma X + \eta D \times X + \varepsilon $$

and we omit both terms from the short regression?

**Tags:** econometrics, regression, endogeneity

---

## 1 answers

### Answer by username_1 on 2022-11-27. Score: 3 | Accepted answer

When $y$ is regressed on $D$ only, we have
$$\hat\beta_{ols} = \frac{\sum_{i=1}^n D_i y_i}{\sum_{i=1}^n D_i} - \frac{\sum_{i=1}^n (1-D_i)y_i}{\sum_{i=1}^n (1-D_i)},$$
which can be proved using algebra. The remaining is straightforward. We have
$$ \mathrm{plim} \hat\beta_{ols} = E(y|D=1) - E(y|D=0).$$
With $y = \alpha + \beta D + \gamma X + \eta(DX) + \varepsilon,\;\;$ where $E(\varepsilon|D,X)=0,\;\;$ we have
\begin{align}
  E(y|D=1) &= \alpha + \beta + \gamma E(X|D=1) + \eta E(X|D=1),\\
  E(y|D=0) &= \alpha + \gamma E(X|D=0),
\end{align}
and thus
$$
  \mathrm{plim} \hat\beta_{ols} = \beta + \gamma [E(X|D=1) - E(X|D=0)] + \eta E(X|D=1).
$$
I've done a simulation.
set.seed(1)
n <- 100000
d <- as.numeric(rnorm(n) > 0)
x <- 0.5*d + rnorm(n, mean=1)
# E(x|d=1)=1.5, E(x|d=0)=0.5
y <- 1-0.5*d+x+2*d*x+rnorm(n)
# beta=-0.5, gamma=1, eta=2
# plim bhat(ols) = -0.5 + 1*(1.5-0.5) + 2*(1.5) = 3

For this, $\beta= -0.5$, $\gamma = 1$, $\eta=2$, $E(x|d=1) = 0.5+1 = 1.5,\;\;$ and $E(x|d=0) = 1,\;\;$ so that the probability limit of the OLS estimator is $-0.5 + 1(1.5 - 1) + 2(1.5) = 3.\;\;$ Indeed,
lm(y~d)

# Call:
# lm(formula = y ~ d)
#
# Coefficients:
# (Intercept)            d  
#       1.997        3.005


---

