I keep seeing talk of 'moment conditions' or 'moment equations', but don't exactly understand the context.
Consider a very standard regression model: $$y_i = \beta x_i + u_i $$
where $u_i$ is an error term, and suppose all the classic linear regression assumptions hold.
If I relax the exogeneity assumption,i.e., $\mathbb{E}(u|x) \neq 0$ (also side question: Why does this imply that $\mathbb{E}(u_i x_i)\neq0$?), then using OLS here will produce biased estimates right?
Is $\mathbb{E}(u_i | x_i)=0$ the 'moment condition' in OLS? Is it $\mathbb{E}(u_i x_i) =0$ ?
My second question is whether GMM, 2SLS, and IV are specifically distinct from one another.
My book says that when we have $K$ endogeneous regressors and $K$ instruments (exactly identified) we use IV.
In the case of being over-identified, and we have $J>K$ IVs, we use GMM. What about for the under-identified case?
Finally, What's the best way to distinguish between these different methods? For instance, what is the difference in using GMM in an over-identified case vs trying to use IV in that case?
Thanks for any help.