Chapter 6 Exercises
Verbeek, A Guide to Modern Econometrics (5th ed.) §§6.1–6.4
How to use this file
- Textbook: Marno Verbeek, A Guide to Modern Econometrics, Fifth Edition (John Wiley & Sons, 2017).
- Range: Chapter 6 Exercises 6.1 (a–l) and 6.2 (a–d).
- Pages: printed pp. 212–214; PDF pp. 224–226 (offset PDF ≈ printed + 12). Chapter 7 begins on printed p. 215.
- Principle: stems follow the textbook; solutions are independent. Numerical claims in the chapter (the balls illustration, not these exercises) were recomputed in the Notes.
- Companion notes:
ch06-notes.qmd.
The locked list is the chapter-end Exercises block (printed pp. 212–214 / PDF pp. 224–226): two titled problems, no empirical dataset.
Exercise 6.1
Normal linear regression \(y_i=\beta_1+\beta_2 x_i+\varepsilon_i\), \(i=1,\ldots,N\) independent, \(\varepsilon_i\sim\mathrm{NID}(0,\sigma^2)\) independent of all \(x_i\). Density of \(y_i\) given \(x_i\) as in the text. (a)–(c) loglikelihood contribution and scores. Then \(x_i\) is a male dummy (\(x_i=1\) for \(i=1,\ldots,N_1\)). (d)–(g) ML estimators, mixed Hessian, two covariance estimators, and a heteroskedasticity-robust alternative. (h)–(l) Wald, LR and LM for \(H_0:\beta_2=0\), and the finite-sample inequality \(\xi_W\ge\xi_{LR}\ge\xi_{LM}\).
(a) The contribution of observation \(i\) is the log density,
\[ \log L_i(\beta,\sigma^2)=-\frac12\log(2\pi\sigma^2)-\frac{(y_i-\beta_1-\beta_2 x_i)^2}{2\sigma^2}. \]
Independence of the \(\varepsilon_i\) (and hence of the \(y_i\) given \(X\)) makes the joint density a product, so
\[ \log L(\beta,\sigma^2)=\sum_{i=1}^N\log L_i(\beta,\sigma^2). \]
(b) Write \(\varepsilon_i=y_i-\beta_1-\beta_2 x_i\). Then
\[ \frac{\partial\log L_i}{\partial\beta_1}=\frac{\varepsilon_i}{\sigma^2},\qquad \frac{\partial\log L_i}{\partial\beta_2}=\frac{\varepsilon_i x_i}{\sigma^2}. \]
Under the model, \(E\{\varepsilon_i\mid x_i\}=0\), so both conditional (and therefore unconditional) expectations are zero at the true parameter values.
(c) Differentiating with respect to \(\sigma^2\) as a single parameter,
\[ \frac{\partial\log L_i}{\partial\sigma^2}=-\frac{1}{2\sigma^2}+\frac{\varepsilon_i^2}{2\sigma^4}. \]
\(E\{\varepsilon_i^2\mid x_i\}=\sigma^2\) implies
\[ E\Bigl\{\frac{\partial\log L_i}{\partial\sigma^2}\Bigr\}=-\frac{1}{2\sigma^2}+\frac{\sigma^2}{2\sigma^4}=0. \]
(d) The first-order conditions for \((\beta_1,\beta_2)\) are \(\sum_i\varepsilon_i=0\) and \(\sum_i\varepsilon_i x_i=0\) (the \(\sigma^2\) factor cancels). With \(x_i\in\{0,1\}\) and \(x_i=1\) only for \(i=1,\ldots,N_1\), the second equation uses only the male observations:
\[ \sum_{i=1}^{N_1}(y_i-\beta_1-\beta_2)=0\implies\beta_1+\beta_2=\bar y_M:=\frac1{N_1}\sum_{i=1}^{N_1}y_i. \]
The first equation then reduces to a sum over females only, because the male sum is already zero:
\[ \sum_{i=N_1+1}^{N}(y_i-\beta_1)=0\implies\hat\beta_1=\bar y_F:=\frac1{N-N_1}\sum_{i=N_1+1}^{N}y_i, \]
and \(\hat\beta_2=\bar y_M-\hat\beta_1\), which is the expression in the text. Interpretation: \(\hat\beta_1\) is the female sample mean of \(y\); \(\hat\beta_2\) is the male–female difference in sample means. The true values are \(\beta_1=E\{y_i\mid x_i=0\}\) and \(\beta_2=E\{y_i\mid x_i=1\}-E\{y_i\mid x_i=0\}\).
(e) Let \(\tilde x_i=(1,x_i)'\). The \(\beta\)-score is \((\varepsilon_i/\sigma^2)\tilde x_i\). Differentiating it with respect to \(\sigma^2\) gives \(-(\varepsilon_i/\sigma^4)\tilde x_i\). Differentiating the \(\sigma^2\)-score in (c) with respect to \(\beta\) uses \(\partial\varepsilon_i/\partial\beta=-\tilde x_i\) and yields the same vector: mixed partials are equal (Young’s theorem, and here they can be checked by hand). Taking \(E\{\,\cdot\mid x_i\}\) gives zero because \(E\{\varepsilon_i\mid x_i\}=0\).
Implication: the information matrix of \((\beta_1,\beta_2,\sigma^2)\) is block diagonal between \(\beta\) and \(\sigma^2\). The ML estimators \(\hat\beta\) and \(\hat\sigma^2\) are asymptotically independent, and the asymptotic covariance matrix of \((\hat\beta_1,\hat\beta_2,\hat\sigma^2)'\) is block diagonal. Inference on \(\beta\) does not require the off-diagonal information blocks.
(f) Two consistent estimators of the asymptotic covariance of \(\sqrt{N}(\hat\beta-\beta)\), under correct specification.
Hessian / expected information. The \(\beta\)-block Hessian contribution is \(-\tilde x_i\tilde x_i'/\sigma^2\), which does not depend on \(y_i\). Evaluated at the ML estimates,
\[ \hat V_H=\hat\sigma^2\Biggl(\frac1N\sum_{i=1}^N\tilde x_i\tilde x_i'\Biggr)^{-1}=\hat\sigma^2\begin{pmatrix}1&\hat\pi\\ \hat\pi&\hat\pi\end{pmatrix}^{-1}, \]
where \(\hat\pi=N_1/N\) and \(\hat\sigma^2=N^{-1}\sum_i\hat\varepsilon_i^2\). The inverse is
\[ \begin{pmatrix}1&\hat\pi\\ \hat\pi&\hat\pi\end{pmatrix}^{-1} =\frac1{\hat\pi(1-\hat\pi)}\begin{pmatrix}\hat\pi&-\hat\pi\\ -\hat\pi&1\end{pmatrix} =\begin{pmatrix}(1-\hat\pi)^{-1}&-(1-\hat\pi)^{-1}\\ -(1-\hat\pi)^{-1}&[\hat\pi(1-\hat\pi)]^{-1}\end{pmatrix}. \]
This matches the sampling variances of two group means: \(\mathrm{Var}(\sqrt{N}\hat\beta_1)\to\sigma^2/(1-\pi)\) and \(\mathrm{Var}(\sqrt{N}\hat\beta_2)\to\sigma^2/[\pi(1-\pi)]\).
OPG / BHHH. Using the \(\beta\)-scores only (block diagonality),
\[ \hat V_G=\Biggl(\frac1N\sum_{i=1}^N\frac{\hat\varepsilon_i^2}{\hat\sigma^4}\tilde x_i\tilde x_i'\Biggr)^{-1}. \]
Both are consistent for \(\sigma^2(E\{\tilde x_i\tilde x_i'\})^{-1}\) when the likelihood is correct. They are not identical in finite samples unless the \(\hat\varepsilon_i^2\) happen to be constant. The Hessian version typically has better small-sample behaviour (§6.1.2).
(g) If \(\varepsilon_i\) may be heteroskedastic, \(E\{s_{i\beta}\}=E\{\varepsilon_i\tilde x_i/\sigma^2\}=0\) still holds provided \(E\{\varepsilon_i\mid x_i\}=0\), so \(\hat\beta\) remains consistent as a quasi-ML estimator, but \(I\neq J\). The sandwich (6.42) for \(\sqrt{N}(\hat\beta-\beta)\) reduces to
\[ \bigl(E\{\tilde x_i\tilde x_i'\}\bigr)^{-1}E\{\varepsilon_i^2\tilde x_i\tilde x_i'\}\bigl(E\{\tilde x_i\tilde x_i'\}\bigr)^{-1}, \]
estimated by White’s form \((X'X)^{-1}(\sum_i\hat\varepsilon_i^2\tilde x_i\tilde x_i')(X'X)^{-1}\) for \(\hat\beta\) itself. For the dummy regressor this allows different male and female error variances.
(h) Wald: estimate without the restriction and ask whether \(R\hat\theta-q\) is close to zero, using the unrestricted asymptotic covariance. LR: estimate twice, with and without \(H_0\), and ask whether \(2[\log L(\hat\theta)-\log L(\tilde\theta)]\) is large. LM (score): estimate only under \(H_0\) and ask whether the unrestricted scores, evaluated at the constrained estimates, are close to zero.
(i) Here \(H_0:\beta_2=0\). Wald needs the unrestricted OLS/ML (include the male dummy) and \(\widehat{\mathrm{se}}(\hat\beta_2)\); the statistic is \((\hat\beta_2/\widehat{\mathrm{se}}(\hat\beta_2))^2\). LR needs that fit and the restricted intercept-only fit, then twice the difference in loglikelihoods (or, equivalently, a comparison of residual sums of squares via the Gaussian loglikelihood). LM needs only the intercept-only estimates: form the score contributions of the unrestricted model at \(\tilde\beta_1=\bar y\), \(\tilde\beta_2=0\), \(\tilde\sigma^2=N^{-1}\sum_i(y_i-\bar y)^2\), and compute \(NR^2\) from the auxiliary regression of a vector of ones on those scores (no intercept), or the equivalent residual regression of §6.3.1.
(j) The power of a test is the probability of rejecting \(H_0\) when \(H_0\) is false (one minus Type II error; Chapter 2). For a shared asymptotic \(\chi^2_1\) critical value, \(\xi_W\ge\xi_{LR}\ge\xi_{LM}\) on every finite sample implies that Wald rejects whenever LR does, and LR whenever LM does. Wald therefore has the highest power — but the comparison is not size-adjusted.
(k) The (actual) size is the probability of rejecting \(H_0\) when \(H_0\) is true (actual Type I error). The same inequality holds under \(H_0\) as well, so Wald has the largest actual size and LM the smallest. All three have the same asymptotic size.
(l) The inequality alone does not pick a winner: the procedure that rejects more often buys power with size. In this Gaussian linear model the exact \(t\)/\(F\) test is available and is preferable to all three asymptotic statistics (§6.3.1). Among the trinity, LR is the usual compromise; LM is the most conservative here, while Wald is the most oversized. Do not treat the ranking as a reason to default to Wald.
Exercise 6.2
Poisson regression: \(y_i\) is a count, \(\lambda_i=\exp\{\beta_1+\beta_2 x_i\}\),
\[ P\{y_i=y\mid x_i\}=e^{-\lambda_i}\lambda_i^y/y!. \]
- loglikelihood; (b) score contributions have mean zero; (c) information matrix, asymptotic covariance, and a consistent estimator; (d) LM test for an omitted variable, including the auxiliary regression. Further detail in §7.3.
(a) \(\log P\{y_i\mid x_i\}=-\lambda_i+y_i\log\lambda_i-\log(y_i!)\) with \(\lambda_i=\exp(\beta_1+\beta_2 x_i)\). Independence across \(i\) gives
\[ \log L(\beta)=\sum_{i=1}^N\bigl[-e^{\beta_1+\beta_2 x_i}+y_i(\beta_1+\beta_2 x_i)-\log(y_i!)\bigr]. \]
(b) Let \(z_i=(1,x_i)'\). Then \(\partial\lambda_i/\partial\beta=\lambda_i z_i\), so the contribution of \(i\) has score
\[ s_i(\beta)=\frac{\partial\log L_i}{\partial\beta}=(y_i-\lambda_i)z_i. \]
The Poisson mean formula \(E\{y_i\mid x_i\}=\lambda_i\) yields \(E\{s_i(\beta)\mid x_i\}=0\), hence \(E\{s_i(\beta)\}=0\).
(c) Differentiating the score, \(\partial s_i/\partial\beta'=-\lambda_i z_i z_i'\) (the \(y_i\) term does not depend on \(\beta\)). The information in observation \(i\), conditional on \(x_i\), is therefore
\[ I_i(\beta_1,\beta_2)=E\bigl\{-\partial^2\log L_i/\partial\beta\partial\beta'\mid x_i\bigr\}=\lambda_i z_i z_i'. \]
The limiting information is \(I(\beta)=\lim N^{-1}\sum_i\lambda_i z_i z_i'\) (or \(E\{\lambda_i z_i z_i'\}\) in an i.i.d. sampling frame). Under correct specification \(V=I(\beta)^{-1}\), so
\[ \sqrt{N}(\hat\beta-\beta)\to\mathcal N\bigl(0,I(\beta)^{-1}\bigr). \]
A consistent estimator replaces \(\lambda_i\) by \(\hat\lambda_i=\exp(\hat\beta_1+\hat\beta_2 x_i)\):
\[ \hat V_H=\Biggl(\frac1N\sum_{i=1}^N\hat\lambda_i z_i z_i'\Biggr)^{-1}, \]
which is also the Hessian estimator (the Hessian does not depend on \(y_i\)). The OPG estimator \(\{N^{-1}\sum_i(y_i-\hat\lambda_i)^2 z_i z_i'\}^{-1}\) is another consistent estimator when the Poisson variance equals the mean; if that fails, use the sandwich of §6.4.1.
(d) An omitted variable \(w_i\) enlarges the mean to \(\lambda_i=\exp(\beta_1+\beta_2 x_i+\gamma w_i)\). The null \(H_0:\gamma=0\) is tested by an LM statistic that uses only the constrained (current) Poisson ML estimates \(\hat\lambda_i=\exp(\hat\beta_1+\hat\beta_2 x_i)\). The additional score is \((y_i-\hat\lambda_i)w_i\). The OPG auxiliary regression of §6.2.2 is: regress a vector of ones (no intercept) on the columns
\[ \bigl[(y_i-\hat\lambda_i),\ (y_i-\hat\lambda_i)x_i,\ (y_i-\hat\lambda_i)w_i\bigr] \]
and form \(NR^2\), which is asymptotically \(\chi^2_1\) under \(H_0\) if \(w_i\) is a single omitted variable (\(J\) columns and \(\chi^2_J\) if \(w_i\) is \(J\)-dimensional). The first two columns correspond to the already imposed scores and sum to zero; they must still be included unless the information matrix is known to be block diagonal in a way that makes them irrelevant (it is not, in general).