<p>Let $X$ be the original regressor matrix and $Z = [z \;\; zd]$ be the intstruments matrix, and consider the IV estimator</p>

<p>$$\hat \beta_{IV} = (Z'X)^{-1}Z'y = (Z'X)^{-1}Z'(X\beta + u) = \beta + (Z'X)^{-1}Z'u$$</p>

<p>As long as the things that are included in $Z$ are orthogonal to the error term, we get consistency... provided that $Z'X$ remains invertible, something that you can easily check in your case.</p>

CC BY-SA 4.0
2018-07-05T14:37:23.530Z
Thank you. With regards to the projection of X and XD in the first stage, would they each be projected onto Z and ZD in order to obtain fitted values?
ChinG
CC BY-SA 4.0
2018-07-05T16:46:35.580Z
@ChinG If I understand your question correctly, fitted values for the dependent variable should be obtained by using $x_i$ and $d_i$, alongside the IV estimates.
Alecos Papadopoulos
CC BY-SA 4.0
2018-07-05T20:01:09.757Z
I think I was not clear in my question: X is endogenous, so I assume so is XD. I only have one instrument Z. It seems according to your response that I can use ZD as an instrument as well. However, in the first stage, will I regress X on Z and ZD in one regression, and XD on Z and ZD in the second? This way I will obtain fitted values for X and XD as separate regressions on both instruments in the first stage. Thereafter I use these fitted values on the RHS in the second.  I feel as if I am missing something basic. Thanks a lot @Alecos Papadopoulos
ChinG
CC BY-SA 4.0
2018-07-05T23:59:50.927Z
@ChinG We do not apply 2SLS here, especially since you have only one instrument. My answer deals with a one-stage estimator.
Alecos Papadopoulos
CC BY-SA 4.0
2018-07-05T13:56:36.250Z
2018-07-05T13:56:36.250Z
Alecos Papadopoulos
<p>Suppose I have a regression model:
$$y_{i}=x_{1i}\beta_{1}+x_{1i}D_{i}\beta_{2}+\epsilon
$$
 where $\mathbb{E}\left[\epsilon_{i}|x_{i}\right]\neq0$ , and there
is a problem of endogeneity. In the above, think of the dummy variable
being equal to $1$ when $i$ is male. As such, this model allows
for a differential effect of $x_{1i}$ on $y_{i}$, if the individual
is a male or female. In order to obtain consistent estimates, suppose
I have an instrument $z_{1i}$, which is both a relevant instrument
for $x_{1i}$, and satisfies the exclusion restriction (such that
$cov(z_{i},\epsilon_{i})=0).$ If there were no interaction term,
it would be trivial to estimate the above using Two stage least squares,
or simply just computing:
$$
\hat{\beta}=\left(\boldsymbol{z'}x\right)^{-1}\left(\boldsymbol{z'y}\right)
$$</p>

<p>However, the complication arises due to the interaction term. How
would I go about obtaining estimates for both $\beta_{1}$ and $\beta_{2}$?
One option is to construct another instrument $D_{i}Z_{1i}$. Would
such a procedure be valid? </p>

CC BY-SA 4.0
2019-05-28T18:20:00.600Z
In your model, you have an interaction term but do not include all constitutive terms... why?
Dylan
CC BY-SA 4.0
2019-05-28T19:51:58.470Z
This does not provide an answer to the question. Once you have sufficient [reputation](https://economics.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://economics.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/18869)
Bayesian
<econometrics>
2SLS with endogenous interaction terms
ChinG
# 2SLS with endogenous interaction terms

(Asked by: username_0 on 2018-07-05)

Suppose I have a regression model:
$$y\_{i}=x\_{1i}\beta\_{1}+x\_{1i}D\_{i}\beta\_{2}+\epsilon
$$
where $\mathbb{E}\left[\epsilon\_{i}|x\_{i}\right]\neq0$ , and there
is a problem of endogeneity. In the above, think of the dummy variable
being equal to $1$ when $i$ is male. As such, this model allows
for a differential effect of $x\_{1i}$ on $y\_{i}$, if the individual
is a male or female. In order to obtain consistent estimates, suppose
I have an instrument $z\_{1i}$, which is both a relevant instrument
for $x\_{1i}$, and satisfies the exclusion restriction (such that
$cov(z\_{i},\epsilon\_{i})=0).$ If there were no interaction term,
it would be trivial to estimate the above using Two stage least squares,
or simply just computing:
$$
\hat{\beta}=\left(\boldsymbol{z'}x\right)^{-1}\left(\boldsymbol{z'y}\right)
$$

However, the complication arises due to the interaction term. How
would I go about obtaining estimates for both $\beta\_{1}$ and $\beta\_{2}$?
One option is to construct another instrument $D\_{i}Z\_{1i}$. Would
such a procedure be valid?

**Tags:** econometrics
> **Comments:**
> **username_1**: In your model, you have an interaction term but do not include all constitutive terms... why?  
> **username_2**: This does not provide an answer to the question. Once you have sufficient [reputation](https://economics.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://economics.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/low-quality-posts/18869)  

---

## 1 answers

### Answer by username_3 on 2018-07-05. Score: 1 | Accepted answer

Let $X$ be the original regressor matrix and $Z = [z \;\; zd]$ be the intstruments matrix, and consider the IV estimator

$$\hat \beta\_{IV} = (Z'X)^{-1}Z'y = (Z'X)^{-1}Z'(X\beta + u) = \beta + (Z'X)^{-1}Z'u$$

As long as the things that are included in $Z$ are orthogonal to the error term, we get consistency... provided that $Z'X$ remains invertible, something that you can easily check in your case.

> **Comments:**
> **username_0**: Thank you. With regards to the projection of X and XD in the first stage, would they each be projected onto Z and ZD in order to obtain fitted values?  
> **username_3**: @ChinG If I understand your question correctly, fitted values for the dependent variable should be obtained by using $x_i$ and $d_i$, alongside the IV estimates.  
> **username_0**: I think I was not clear in my question: X is endogenous, so I assume so is XD. I only have one instrument Z. It seems according to your response that I can use ZD as an instrument as well. However, in the first stage, will I regress X on Z and ZD in one regression, and XD on Z and ZD in the second? This way I will obtain fitted values for X and XD as separate regressions on both instruments in the first stage. Thereafter I use these fitted values on the RHS in the second.  I feel as if I am missing something basic. Thanks a lot @Alecos Papadopoulos  
> **username_3**: @ChinG We do not apply 2SLS here, especially since you have only one instrument. My answer deals with a one-stage estimator.  

---

