Lecture 11
PIMES/UFPE
Not “\(y=\mathbf{x}'\bbeta+\varepsilon\) with assumptions.” The primitive is a set of valid moment conditions \(\E[\mathbf{g}(\mathbf{d}_i,\btheta_0)]=\bzero\), holding only at the true \(\btheta_0\). The parameter is whatever zeroes the population moments; everything else is how we estimate it from the sample.
The simplest estimator there is already works this way. Ask “what is the mean of \(y\)?” — the answer \(\mu\) is the one number for which \(y_i-\mu\) averages to zero. That is a moment condition; estimating it is just swapping the population average for the sample one and solving: \[\E[\,\underbrace{y_i-\mu}_{\textstyle\mathbf{g}(\mathbf{d}_i,\mu)}\,]=0\ \ \text{(only at }\mu_0=\E[y_i]) \qquad\xrightarrow{\ \text{analogy principle}\ }\qquad \tfrac1n\sum_{i=1}^n (y_i-\mu)=0\ \ \Rightarrow\ \ \hat\mu=\bar y .\] The same three objects name every estimator in the course: the data \(\mathbf{d}_i\) (all you observe for \(i\)), the parameter \(\btheta\) (\(k\times1\)), and the moment \(\mathbf{g}(\mathbf{d}_i,\btheta)\) (\(\ell\times1\)), built to average to zero only at the truth \(\btheta_0\).
Only the moment changes. OLS asserts \(\E[\mathbf{x}\varepsilon]=0\) and uses \(\mathbf{x}\) as its own instrument. But that assumption is exactly what endogeneity breaks (Lecture 9): when \(\E[\mathbf{x}\varepsilon]\neq0\) the OLS moment points at the wrong \(\bbeta\). The fix is to swap in an instrument \(\mathbf{z}\) we do believe is clean, \(\E[\mathbf{z}\varepsilon]=0\) — a new \(\mathbf{g}\), same machine.
| estimator | parameter \(\btheta\) | moment \(\mathbf{g}(\mathbf{d}_i,\btheta)\) | count |
|---|---|---|---|
| mean | \(\mu\) | \(y_i-\mu\) | \(\ell=k=1\) |
| OLS | \(\bbeta\) | \(\mathbf{x}_i(y_i-\mathbf{x}_i'\bbeta)\) | \(\ell=k\) |
| IV | \(\bbeta\) | \(\mathbf{z}_i(y_i-\mathbf{x}_i'\bbeta),\ \dim\mathbf{z}_i=k\) | \(\ell=k\) |
| 2SLS | \(\bbeta\) | \(\mathbf{z}_i(y_i-\mathbf{x}_i'\bbeta),\ \dim\mathbf{z}_i=\ell>k\) | \(\boldsymbol{\ell>k}\) |
Write the IV moment condition out and a familiar object returns. One equation per instrument, stacked, is the system you already solved for IV: \[\frac1n\sum_{i=1}^n z_{ij}\,(y_i-\mathbf{x}_i'\bbeta)=0,\quad j=1,\dots,\ell \qquad\Longleftrightarrow\qquad \frac1n\,\bZ'(\bY-\bX\bbeta)=\bzero \qquad(\ell\text{ equations},\ k\text{ unknowns}).\] Identification asks whether this pins \(\bbeta\) down. In population it is the linear system \[\E[\mathbf{z}\mathbf{x}']\,\bbeta=\E[\mathbf{z}y],\qquad\text{unique solution}\quad \bbeta_0=(\E[\mathbf{z}\mathbf{x}'])^{-1}\E[\mathbf{z}y]\ \ \textbf{iff}\ \ \rank\E[\mathbf{z}\mathbf{x}']=k .\]
One endogenous regressor, two instruments: each gives its own IV estimate \(\hat\beta_j\) — and with \(\ell>k\) they disagree.
Since no \(\btheta\) can zero all \(\ell\) moments at once, settle for the \(\btheta\) that makes them jointly smallest, measured by a weighted sum of squares: \[\boxed{\ J(\btheta)=n\,\bar{\mathbf{g}}_n(\btheta)'\,\bW\,\bar{\mathbf{g}}_n(\btheta)\ },\qquad \bW\succ0, \qquad \hat\btheta_{\text{GMM}}=\argmin_{\btheta} J(\btheta).\]
With one moment per parameter there is nothing to weight — set the sample moment to zero and solve, recovering the estimator you already know: \[\text{OLS: } \mathbf{g}=\mathbf{x}_i(y_i-\mathbf{x}_i'\bbeta)\ \Rightarrow\ \tfrac1n\bX'(\bY-\bX\bbeta)=\bzero\ \Leftrightarrow\ \bX'\be=\bzero\ \Rightarrow\ \bb_{\text{OLS}};\] \[\text{IV: } \mathbf{g}=\mathbf{z}_i(y_i-\mathbf{x}_i'\bbeta)\ \Rightarrow\ \tfrac1n\bZ'(\bY-\bX\bbeta)=\bzero\ \Rightarrow\ \bb_{\text{IV}}=(\bZ'\bX)^{-1}\bZ'\bY .\]
Lecture 4 split OLS into two routes — minimize the sum of squares, or solve the moment \(\bX'\be=\bzero\). GMM is the second route made general: every estimator in this course is “solve (or get as close as possible to) a moment condition.”
Now \(\ell>k\) with \(\mathbf{g}=\mathbf{z}_i(y_i-\mathbf{x}_i'\bbeta)\). Minimizing \(J\) with \(\bW=(\bZ'\bZ/n)^{-1}\) gives the closed form \[\hat\btheta_{\text{GMM}}(\bW)=\big(\bX'\bZ\,\bW\,\bZ'\bX\big)^{-1}\bX'\bZ\,\bW\,\bZ'\bY \ \xrightarrow{\ \bW=(\bZ'\bZ)^{-1}\ }\ \bb_{\text{2SLS}}=\big(\bX'\bP_{\bZ}\bX\big)^{-1}\bX'\bP_{\bZ}\bY .\]
Now that \(\bW\) has a meaning, the map completes — each later part fills a row:
| Estimator | moment \(\mathbf{g}(\mathbf{d}_i,\btheta)\) | count | weight \(\bW\) |
|---|---|---|---|
| OLS | \(\mathbf{x}(y-\mathbf{x}'\bbeta)\) | \(\ell=k\) | irrelevant |
| IV | \(\mathbf{z}(y-\mathbf{x}'\bbeta)\) | \(\ell=k\) | irrelevant |
| 2SLS | \(\mathbf{z}(y-\mathbf{x}'\bbeta)\) | \(\ell>k\) | \((\bZ'\bZ)^{-1}\) |
| Efficient GMM | \(\mathbf{z}(y-\mathbf{x}'\bbeta)\) | \(\ell>k\) | \(\bS^{-1}\) (Part III) |
For any fixed \(\bW\succ0\), \(\hat\btheta_{\text{GMM}}(\bW)\) is consistent — the moments are valid, so it finds \(\btheta_0\) whatever the weight. What \(\bW\) changes is only the asymptotic variance. So two questions, in order: what is that variance, and which \(\bW\) makes it smallest?
Every fixed \(\bW\) gives a consistent, asymptotically normal estimator. With \(\bG=\E[\partial \mathbf{g}/\partial\btheta']\) (the moment Jacobian — how the moments move with \(\btheta\)) and \(\bS\) the moment variance: \[\sqrt n\,(\hat\btheta_{\text{GMM}}(\bW)-\btheta_0)\ \dto\ \Normal\!\Big(\bzero,\ \underbrace{(\bG'\bW\bG)^{-1}\bG'\bW\,\bS\,\bW\bG\,(\bG'\bW\bG)^{-1}}_{\textstyle V(\bW)}\Big).\] The variance \(V(\bW)\) still depends on \(\bW\) — \(\bG,\bS\) are fixed, only \(\bW\) is ours. Which \(\bW\) makes it smallest is the next slide.
Minimise the previous slide’s \(V(\bW)\) over \(\bW\): the optimum is \(\bW^{\ast}=\bS^{-1}\), and the variance collapses to the efficiency bound \((\bG'\bS^{-1}\bG)^{-1}\). With \(\bS=\E[\mathbf{g}\mathbf{g}']\) — the variance of the moment \(\mathbf{g}=\mathbf{z}\varepsilon\) at \(\btheta_0\) (Board): \[\begin{aligned} \textbf{homosk.:}\quad &\bS=\sigma^2\bQ_{zz}\ \Rightarrow\ \bW^{\ast}=(\sigma^2\bQ_{zz})^{-1}\ \Rightarrow\ \textbf{2SLS efficient};\\[2pt] \textbf{heterosk.:}\quad &\bS=\E[\mathbf{z}\mathbf{z}'\varepsilon^2]=\bOmega\neq\sigma^2\bQ_{zz}\ \Rightarrow\ \textbf{2SLS not efficient.} \end{aligned}\]
The optimal weight \(\bW^{\ast}=\bS^{-1}\) needs \(\bS=\E[\mathbf{z}\mathbf{z}'\varepsilon^2]\) — the unknown errors. Break the circle: get a consistent \(\hat\btheta\) with any valid weight, use its residuals to estimate \(\bS\), then reweight. \[\underbrace{\bW=(\bZ'\bZ)^{-1}\Rightarrow\hat\btheta^{(1)}\Rightarrow\hat\varepsilon_i}_{\textbf{Step 1 (consistent)}} \quad \underbrace{\hat\bS=\tfrac1n\textstyle\sum_i \mathbf{z}_i\mathbf{z}_i'\hat\varepsilon_i^2}_{\textbf{estimate }\bS} \quad \underbrace{\bW=\hat\bS^{-1}\Rightarrow\hat\btheta^{(2)}}_{\textbf{Step 2 (efficient)}}.\]
With \(\ell>k\) the estimator forces only \(k\) combinations of the \(\ell\) sample moments to zero — its first-order conditions. The surplus \(\ell-k\) are left free — noise if every moment is valid, systematically large if one is not — and the minimized criterion measures exactly them: \[J=n\,\bar{\mathbf{g}}_n(\hat\btheta)'\,\hat\bS^{-1}\,\bar{\mathbf{g}}_n(\hat\btheta)\ \dto\ \chi^2_{\ell-k} \quad\text{under } H_0:\ \E[\mathbf{g}(\mathbf{d}_i,\btheta_0)]=\bzero .\]
Classic Sargan and the robust \(J\) ask the same question — are the surplus moments mutually consistent? — and differ only in \(\hat\bS\). Homoskedastic moments give \(\hat\bS=\hat\sigma^2(\bZ'\bZ/n)\) and \(J\) collapses to Sargan’s \(nR^2\); drop that assumption and White’s \(\hat\bS^{-1}\) gives Hansen’s robust version. GMM also explains the degrees of freedom: \(\ell\) moments minus the \(k\) the estimator forces to zero.
GMM did not fade — it split. Its place today depends entirely on which kind of empirical work you do.
Estimators that solve \(\tfrac1n\sum_i \boldsymbol{\psi}(\mathbf{d}_i,\btheta)=\bzero\) are Z-estimators (\(Z\) for zero). OLS, IV — and, next lecture, MLE (score \(=\bzero\)) — are all of this family; GMM extends it to the over-identified case (\(\ell>k\)).
The thread continues: minimize a criterion (OLS, GMM) or solve a moment / maximize a likelihood (IV, MLE) — all extremum / M-estimators. Lecture 12 names the family and derives MLE inside it.