# Omitted Variable Bias with interaction terms

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?

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