Hausman Test intuition I don't understand why after plugging the residual from running the endogenous variable on instrument and other variables into the structural equation, we can tell whether the suspected endogenous variable is actually endogenous or not.
My confusion stems from the fact that even the coefficient of the residual-hat is significant, wouldn't that only mean that it's significant in explaining the dependent variable y? But we are interested in the Cov(x,residual hat)? Why couldn't we just run a regression between X and the residual hat to determine this relationship? Why do we have to plug the residual back into the structural equation?
Please help I've been thinking about this for 3 days. Thank you!!
 A: Consider the model
\begin{equation}
y_{1i}=z_{i1}'\delta+\alpha y_{2i}+u_i
\end{equation}
We suspect $y_{2i}$ to be endogenous. Assume $z_{i1}$ is exogenous. We have at least one more valid instrument not contained in $z_{i1}$. The union of all
instruments is denoted by $x_i$. Now, write the linear projection of $y_{2i}$ on $x_i$ as
\begin{equation}
y_{2i}=x_i'\pi+v_i,
\end{equation}
so that $E(x_iv_i)=0$. As $u_i$ is uncorrelated with $x_i$, it follows from
$$
E(y_{i2}u_i)=E[(x_i'\pi+v_i)u_i]=E[v_iu_i],
$$
that $y_{2i}$ is endogenous if and only if $$E(u_iv_i)\neq 0.$$
This observation motivates the test. Write down the linear projection
\begin{equation}
u_i=\rho v_i+e_i,
\end{equation}
so that, by properties of linear projection coefficients, $$\rho=E(u_iv_i)/E(v_i^2)$$ and $$E(v_ie_i)=0.$$ $y_{2i}$ is endogenous if and only if $\rho\neq 0$. Inserting the equation for $u_i$ into the structural model
yields
\begin{equation}
y_{1i}=z_{i1}'\delta+\alpha y_{2i}+\rho v_i+e_i
\end{equation}
Rearranging $u_i=\rho v_i+e_i$ yields
$$
E[e_ix_i]=E[(u_i-\rho v_i)x_i].
$$
Due the exogeneity of $x_i$, $e_i$ is uncorrelated with $x_i$. As $u_i=\rho v_i+e_i$ is a linear projection, the same goes for $v_i$. Hence, $e_i$ is also uncorrelated with $y_{2i}$.
We could therefore test $H_0:\rho=0$ with a simple $t$-test in the regression $y_{1i}=z_{i1}'\delta+\alpha y_{2i}+\rho v_i+e_i$. This regression can however of course not be implemented as it stands, as $v_i$ is unobservable. But, we can get estimates $\widehat{v}_i$ through an OLS-regression for
$$
y_{2i}=x_i'\pi+v_i.
$$ 
This then yields the estimating equation
$$
y_{1i}=z_{i1}'\delta+\alpha y_{2i}+\rho\widehat{v}_i+\tilde{e}_i,
$$
for which the estimated coefficients are consistent for the respective parameters. One can show that $H_0:\rho=0$ can be tested with the usual (or, if necessary, with the heteroskedasticity robust) $t$-statistic of $\widehat{\rho}$. 
(We estimate the equation with a generated regressor $\widehat{v}_i$. This usually has implications for inference; but not here as the generated regressor does not enter the model under $H_0$. See Wooldridge (Cross-Section and Panel Data Econometrics) for details.) 
In plain English: We break up $y_{2i}$ into a part ($x_i$) that is uncorrelated with $u_i$ and one that may (endoneity) or may not (no endogeneity) correlate with $u_i$ ($v_i$). The former is the case if $\rho\neq0$, which may be tested once we have obtained the observable counterpart to $v_i$.
