Taller Teórico del Capítulo 5 — Resolución directa
Demostraciones: MCG, variables instrumentales, máxima verosimilitud y contrastes
Cómo usar este documento
El profesor elegirá dos puntos al azar, así que cada solución está escrita para que se sostenga sola: empieza por lo que se puede dar por sabido y avanza en pasos cortos hasta el resultado que pide el enunciado. Cuando un punto usa otro, lo digo expresamente y, si el uso es solo “por comodidad”, doy la ruta que no lo necesita.
El taller salta del punto 3 al 6 (no existen los puntos 4 y 5; Word reinicia la lista) y luego sigue 7, 8, …, 16. Aquí se respeta esa numeración.
Mapa de los puntos
| Punto | Qué se pide | Idea clave | Usa | Extensión |
|---|---|---|---|---|
| 1 | \(\mathbf b\) no es eficiente si \(\boldsymbol\Omega\neq\mathbf I\) | Gauss–Markov en el modelo transformado, o matriz \(\mathbf D\) con \(\mathbf D\mathbf X=\mathbf 0\) | 3 (opcional 2) | media |
| 2 | \(\mathrm{Var}(\mathbf b)\) en forma de “sándwich” | \(\mathbf b-\boldsymbol\beta=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf u\) | — | corta |
| 3 | Por qué el MCG es eficiente; estimador y varianza | \(\boldsymbol\rho\boldsymbol\Omega\boldsymbol\rho'=\mathbf I\) y Gauss–Markov | — | corta |
| 6 | \(\mathbf b_{iv}\) consistente pero ineficiente | límites en probabilidad; matriz \(\mathbf D\) con \(\mathbf D\mathbf Q=\mathbf 0\) | — | larga |
| 7 | Estimador eficiente del punto 6 (MC2E) | peso \((\mathbf Z'\mathbf Z)^{-1}\) | 6 | media |
| 8 | Exponente de la normal multivariada con independencia | \(\boldsymbol\Sigma\) diagonal | — | corta |
| 9 | Verosimilitud y log-verosimilitud del modelo lineal | producto de densidades normales | — | corta |
| 10 | \(\mathbf u'\mathbf u=\mathbf y'\mathbf y-2(\mathbf X'\mathbf y)'\boldsymbol\beta+\boldsymbol\beta'\mathbf X'\mathbf X\boldsymbol\beta\) | expandir el producto | — | corta |
| 11 | EMV de \(\boldsymbol\beta\) y \(\sigma^2\) (esférico) | condiciones de primer orden | 9, 10 | media |
| 12 | Log-verosimilitud y EMV con \(\boldsymbol\Omega\) conocida | \(\lvert\sigma^2\boldsymbol\Omega\rvert=(\sigma^2)^n\lvert\boldsymbol\Omega\rvert\) y CPO | — | media |
| 13 | MCO restringido \(\mathbf b_*\) | Lagrangiano | — | media |
| 14 | \(\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e=(\mathbf r-\mathbf R\mathbf b)'[\cdots]^{-1}(\mathbf r-\mathbf R\mathbf b)\) | \(\mathbf X'\mathbf e=\mathbf 0\) | 13 | media |
| 15 | \(F\), \(W\), \(LM\), \(LR\) en términos de \(R^2_{NR}\) y \(R^2_R\) | la \(TSS\) es común | 14 | corta |
| 16 | Distribuciones de \(\mathbf b\), de la forma cuadrática y de \(W\) | reproductividad normal y \(\chi^2\) | — | media |
- Cortas primero: 2, 3, 8, 9, 10, 15: se resuelven casi de memoria.
- Las dos de MV con CPO: 11 y 12 (la 12 es la 11 con \(\boldsymbol\Omega^{-1}\) en medio).
- El bloque restringido: 13 → 14 → 15 (cada una se apoya en la anterior).
- Las más largas: 1, 6, 7 (comparten el mismo truco de la matriz \(\mathbf D\), aprender uno es aprender los tres).
- Reto no evaluable: 16, que sirve para entender de dónde sale la \(\chi^2\).
Bloque A. Disturbios no esféricos y MCG (puntos 1, 2 y 3)
Modelo del taller:
\[ \mathbf y=\mathbf X\boldsymbol\beta+\mathbf u,\qquad \mathbf u\sim(\mathbf 0_{n\times 1},\ \sigma^2\boldsymbol\Omega_{n\times n}),\qquad \boldsymbol\Omega \text{ simétrica y definida positiva, conocida.} \tag{1}\]
El enunciado escribe \(\mathbf 0_{k\times 1}\) y \(\boldsymbol\Omega_{k\times k}\); como \(\mathbf u\) es el vector de errores de las \(n\) observaciones, las dimensiones correctas son \(n\times 1\) y \(n\times n\). Es un desliz de notación, no cambia nada del desarrollo. Se supone además \(\mathbf X\) no estocástica y de rango columna completo \(k\).
Punto 2. Varianza de \(\mathbf b\)
Enunciado: probar que \(\mathrm{Var}(\mathbf b)=\sigma^2(\mathbf X'\mathbf X)^{-1}(\mathbf X'\boldsymbol\Omega\mathbf X)(\mathbf X'\mathbf X)^{-1}\).
- Sustituir \(\mathbf y\) en \(\mathbf b\) y aislar \(\mathbf b-\boldsymbol\beta\).
- Verificar que \(E(\mathbf b)=\boldsymbol\beta\) (así \(\mathrm{Var}(\mathbf b)=E[(\mathbf b-\boldsymbol\beta)(\mathbf b-\boldsymbol\beta)']\)).
- Sacar las matrices constantes fuera de la esperanza y usar \(E(\mathbf u\mathbf u')=\sigma^2\boldsymbol\Omega\).
Solución. Como \(\mathbf y=\mathbf X\boldsymbol\beta+\mathbf u\),
\[ \mathbf b=(\mathbf X'\mathbf X)^{-1}\mathbf X'(\mathbf X\boldsymbol\beta+\mathbf u)=\boldsymbol\beta+(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf u \quad\Longrightarrow\quad \mathbf b-\boldsymbol\beta=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf u . \tag{2}\]
Tomando esperanza, \(E(\mathbf b)=\boldsymbol\beta\) porque \(E(\mathbf u)=\mathbf 0\) y \(\mathbf X\) es constante. Entonces
\[ \begin{aligned} \mathrm{Var}(\mathbf b)&=E\big[(\mathbf b-\boldsymbol\beta)(\mathbf b-\boldsymbol\beta)'\big] =(\mathbf X'\mathbf X)^{-1}\mathbf X'\,E(\mathbf u\mathbf u')\,\mathbf X(\mathbf X'\mathbf X)^{-1}\\[2pt] &=\sigma^2(\mathbf X'\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega\mathbf X(\mathbf X'\mathbf X)^{-1}. \end{aligned} \tag{3}\]
Si \(\boldsymbol\Omega=\mathbf I\) la expresión se colapsa a \(\sigma^2(\mathbf X'\mathbf X)^{-1}\), la fórmula usual. Con \(\boldsymbol\Omega\neq\mathbf I\), usar \(\sigma^2(\mathbf X'\mathbf X)^{-1}\) produce errores estándar incorrectos (aunque \(\mathbf b\) siga siendo insesgado), y por eso fallan los \(t\) y \(F\) habituales.
Punto 3. Estimador de MCG, eficiencia y varianza
Enunciado: con \(\boldsymbol\Omega^{-1}=\boldsymbol\rho'\boldsymbol\rho\) conocida, multiplicar el modelo por \(\boldsymbol\rho\) para obtener \(\mathbf y_*=\mathbf X_*\boldsymbol\beta+\mathbf u_*\). ¿Por qué el estimador del modelo transformado es eficiente? Hallar el estimador y su varianza en términos de \(\mathbf X\) e \(\mathbf y\).
- Transformar: \(\mathbf y_*=\boldsymbol\rho\mathbf y\), \(\mathbf X_*=\boldsymbol\rho\mathbf X\), \(\mathbf u_*=\boldsymbol\rho\mathbf u\).
- Calcular \(\mathrm{Var}(\mathbf u_*)\) y comprobar que es \(\sigma^2\mathbf I\).
- Concluir con Gauss–Markov (MCO en el modelo transformado es MELI).
- Aplicar la fórmula de MCO al modelo transformado y devolver el resultado a \(\mathbf X\) e \(\mathbf y\).
Solución.
Paso 2. De \(\boldsymbol\Omega^{-1}=\boldsymbol\rho'\boldsymbol\rho\) se despeja \(\boldsymbol\Omega=\boldsymbol\rho^{-1}(\boldsymbol\rho')^{-1}\), así que \(\boldsymbol\rho\boldsymbol\Omega\boldsymbol\rho'=\mathbf I\). Entonces
\[ E(\mathbf u_*)=\boldsymbol\rho\,E(\mathbf u)=\mathbf 0,\qquad \mathrm{Var}(\mathbf u_*)=\boldsymbol\rho\,\sigma^2\boldsymbol\Omega\,\boldsymbol\rho'=\sigma^2\mathbf I . \tag{4}\]
Paso 3 (por qué es eficiente). El modelo transformado cumple todos los supuestos de Gauss–Markov: errores de media cero, esféricos (\(\sigma^2\mathbf I\)) y regresores \(\mathbf X_*=\boldsymbol\rho\mathbf X\) no estocásticos de rango \(k\) (porque \(\boldsymbol\rho\) es invertible). Por el teorema de Gauss–Markov, MCO sobre ese modelo es el estimador lineal insesgado de varianza mínima (MELI). Además, como \(\boldsymbol\rho\) es invertible, “lineal en \(\mathbf y_*\)” y “lineal en \(\mathbf y\)” describen la misma clase de estimadores, de modo que ser MELI en el modelo transformado equivale a serlo en el modelo original.
Paso 4 (estimador y varianza). MCO en el modelo transformado:
\[ \mathbf b_{MCG}=(\mathbf X_*'\mathbf X_*)^{-1}\mathbf X_*'\mathbf y_* =(\mathbf X'\boldsymbol\rho'\boldsymbol\rho\mathbf X)^{-1}\mathbf X'\boldsymbol\rho'\boldsymbol\rho\mathbf y =(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\mathbf y , \tag{5}\]
\[ \mathrm{Var}(\mathbf b_{MCG})=\sigma^2(\mathbf X_*'\mathbf X_*)^{-1}=\sigma^2(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}. \tag{6}\]
Es insesgado: \(\mathbf b_{MCG}=\boldsymbol\beta+(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\mathbf u\) y \(E(\mathbf u)=\mathbf 0\).
El MCG es “MCO sobre datos reescalados”: \(\boldsymbol\rho\) pondera y decorrelaciona las observaciones de modo que los errores vuelvan a ser esféricos. Es el estimador de Aitken; coincide con el EMV bajo normalidad (punto 12).
Punto 1. \(\mathbf b\) no es eficiente
Enunciado: probar que \(\mathbf b=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y\) no es eficiente en el modelo de Ecuación 1.
- Ruta A (3 líneas): Gauss–Markov en el modelo transformado del punto 3.
- Ruta B (completa y autocontenida): escribir \(\mathbf b=\mathbf b_{MCG}+\mathbf D\mathbf u\) y mostrar que la diferencia de varianzas es \(\sigma^2\mathbf D\boldsymbol\Omega\mathbf D'\succeq 0\).
Ruta A. \(\mathbf b=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y\) es lineal en \(\mathbf y\) (y por tanto en \(\mathbf y_*\), ver punto 3) e insesgado. Por Gauss–Markov en el modelo transformado, \(\mathrm{Var}(\mathbf b)\succeq\mathrm{Var}(\mathbf b_{MCG})\). Como \(\mathbf b\) no es el MCG, no alcanza esa cota (salvo casos especiales, ver abajo).
Ruta B. Sean \(\mathbf C=(\mathbf X'\mathbf X)^{-1}\mathbf X'\) y \(\mathbf A=(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\), de modo que \(\mathbf b=\mathbf C\mathbf y\) y \(\mathbf b_{MCG}=\mathbf A\mathbf y\). Defino
\[ \mathbf D=\mathbf C-\mathbf A,\qquad \mathbf D\mathbf X=\mathbf C\mathbf X-\mathbf A\mathbf X=\mathbf I-\mathbf I=\mathbf 0 . \tag{7}\]
(a) Descomposición. \(\mathbf b=\mathbf b_{MCG}+\mathbf D\mathbf y=\mathbf b_{MCG}+\mathbf D(\mathbf X\boldsymbol\beta+\mathbf u)=\mathbf b_{MCG}+\mathbf D\mathbf u\), porque \(\mathbf D\mathbf X=\mathbf 0\).
(b) La covarianza cruzada es cero. Como \(\mathbf b_{MCG}-\boldsymbol\beta=\mathbf A\mathbf u\),
\[ \mathrm{Cov}(\mathbf A\mathbf u,\mathbf D\mathbf u)=\sigma^2\mathbf A\boldsymbol\Omega\mathbf D' =\sigma^2(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\boldsymbol\Omega\,\mathbf D' =\sigma^2(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}(\mathbf D\mathbf X)'=\mathbf 0 . \tag{8}\]
(c) Diferencia de varianzas. Entonces
\[ \mathrm{Var}(\mathbf b)=\mathrm{Var}(\mathbf b_{MCG})+\sigma^2\mathbf D\boldsymbol\Omega\mathbf D' \quad\Longrightarrow\quad \mathrm{Var}(\mathbf b)-\mathrm{Var}(\mathbf b_{MCG})=\sigma^2\mathbf D\boldsymbol\Omega\mathbf D'\ \succeq\ 0 . \tag{9}\]
Es semidefinida positiva porque, para cualquier vector \(\mathbf c\), \(\mathbf c'\mathbf D\boldsymbol\Omega\mathbf D'\mathbf c=(\mathbf D'\mathbf c)'\boldsymbol\Omega(\mathbf D'\mathbf c)\ge 0\) (\(\boldsymbol\Omega\) es definida positiva), con igualdad solo si \(\mathbf D'\mathbf c=\mathbf 0\). Así, toda combinación lineal \(\mathbf c'\mathbf b\) tiene varianza mayor o igual que \(\mathbf c'\mathbf b_{MCG}\), y estrictamente mayor para alguna \(\mathbf c\) salvo que \(\mathbf D=\mathbf 0\).
\(\mathbf D=\mathbf 0\) (es decir, \(\mathbf b=\mathbf b_{MCG}\)) ocurre, por ejemplo, con \(\boldsymbol\Omega=\mathbf I\). El enunciado omite esta salvedad; conviene decir “si \(\boldsymbol\Omega\) no es proporcional a \(\mathbf I\) (en general), \(\mathbf b\) es ineficiente”. Se ve con el ejemplo más simple: \(\mathbf X=\boldsymbol\iota\) (vector de unos) y \(\boldsymbol\Omega=\mathrm{diag}(\omega_t)\). Entonces \(\mathbf b=\bar y\) con \(\mathrm{Var}(\bar y)=\sigma^2\sum\omega_t/n^2\), mientras que \(\mathrm{Var}(\mathbf b_{MCG})=\sigma^2/\sum(1/\omega_t)\). La desigualdad \(\mathrm{Var}(\bar y)\ge\mathrm{Var}(\mathbf b_{MCG})\) es exactamente la de las medias aritmética y armónica de los \(\omega_t\).
\(\mathbf b\) sigue siendo insesgado, pero desperdicia información: trata igual a observaciones de distinta precisión. El MCG las pondera por su precisión y obtiene menor varianza.
Bloque B. Variables instrumentales (puntos 6 y 7)
Punto 6. \(\mathbf b_{iv}\) es consistente pero asintóticamente ineficiente
Enunciado: en \(\mathbf y=\mathbf X\boldsymbol\beta+\mathbf u\) con \(\mathrm{plim}\,\tfrac1n\mathbf X'\mathbf u=\boldsymbol\gamma\) (regresores correlacionados con el error), se dispone de \(l>k\) instrumentos en \(\mathbf Z\). Probar que
\[ \mathbf b_{iv}=(\mathbf X'\mathbf Z\mathbf Z'\mathbf X)^{-1}\mathbf X'\mathbf Z\mathbf Z'\mathbf y \tag{10}\]
es consistente pero asintóticamente ineficiente.
Hay que enunciarlos al empezar; son lo que hace funcionar la prueba:
- Exogeneidad: \(\mathrm{plim}\,\tfrac1n\mathbf Z'\mathbf u=\mathbf 0\).
- Relevancia: \(\mathrm{plim}\,\tfrac1n\mathbf Z'\mathbf X=\mathbf Q\) (\(l\times k\)) con rango \(k\).
- \(\mathrm{plim}\,\tfrac1n\mathbf Z'\mathbf Z=\boldsymbol\Sigma_{zz}\) definida positiva.
- \(\mathrm{Var}(\mathbf u)=\sigma^2\mathbf I\) y \(\tfrac{1}{\sqrt n}\mathbf Z'\mathbf u\xrightarrow{d}N(\mathbf 0,\sigma^2\boldsymbol\Sigma_{zz})\) (TCL).
- Sustituir \(\mathbf y\) y aislar \(\mathbf b_{iv}-\boldsymbol\beta\).
- Dividir cada factor por \(n\) y tomar \(\mathrm{plim}\) (consistencia).
- Hallar la distribución asintótica de \(\sqrt n(\mathbf b_{iv}-\boldsymbol\beta)\).
- Compararla con la cota \(\sigma^2(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}\) con el truco de la matriz \(\mathbf D\) (ineficiencia).
Solución.
Consistencia. Con \(\mathbf y=\mathbf X\boldsymbol\beta+\mathbf u\):
\[ \mathbf b_{iv}=\boldsymbol\beta+(\mathbf X'\mathbf Z\mathbf Z'\mathbf X)^{-1}\mathbf X'\mathbf Z\mathbf Z'\mathbf u =\boldsymbol\beta+\Big[\big(\tfrac1n\mathbf X'\mathbf Z\big)\big(\tfrac1n\mathbf Z'\mathbf X\big)\Big]^{-1}\big(\tfrac1n\mathbf X'\mathbf Z\big)\big(\tfrac1n\mathbf Z'\mathbf u\big). \tag{11}\]
(Se dividió por \(n\) el numerador una vez y cada factor del inverso una vez, de modo que los \(n\) se cancelan.) Tomando \(\mathrm{plim}\) y usando continuidad de la inversa:
\[ \mathrm{plim}\,\mathbf b_{iv}=\boldsymbol\beta+(\mathbf Q'\mathbf Q)^{-1}\mathbf Q'\cdot\mathbf 0=\boldsymbol\beta . \tag{12}\]
\(\mathbf Q'\mathbf Q\) (\(k\times k\)) es invertible porque \(\mathbf Q\) tiene rango \(k\). En cambio, \(\mathbf b=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y\) (MCO) tendría \(\mathrm{plim}\,\mathbf b=\boldsymbol\beta+\boldsymbol\Sigma_{XX}^{-1}\boldsymbol\gamma\neq\boldsymbol\beta\): la correlación \(\boldsymbol\gamma\neq\mathbf 0\) es lo que obliga a usar instrumentos.
Distribución asintótica. Sea \(\mathbf A=(\mathbf Q'\mathbf Q)^{-1}\mathbf Q'\) (\(k\times l\)). De Ecuación 11,
\[ \sqrt n(\mathbf b_{iv}-\boldsymbol\beta)\ \xrightarrow{d}\ \mathbf A\cdot N(\mathbf 0,\sigma^2\boldsymbol\Sigma_{zz}) =N\big(\mathbf 0,\ \sigma^2\mathbf A\boldsymbol\Sigma_{zz}\mathbf A'\big), \qquad \mathrm{Avar}(\mathbf b_{iv})=\sigma^2(\mathbf Q'\mathbf Q)^{-1}\mathbf Q'\boldsymbol\Sigma_{zz}\mathbf Q(\mathbf Q'\mathbf Q)^{-1}. \tag{13}\]
Ineficiencia. Considere \(\mathbf B=(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\). Ambas matrices cumplen \(\mathbf A\mathbf Q=\mathbf B\mathbf Q=\mathbf I\), así que \(\mathbf D=\mathbf A-\mathbf B\) satisface \(\mathbf D\mathbf Q=\mathbf 0\). Igual que en el punto 1 (cambiando \(\boldsymbol\Omega\) por \(\boldsymbol\Sigma_{zz}\)), el término cruzado se anula:
\[ \mathbf B\boldsymbol\Sigma_{zz}\mathbf D'=(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}\mathbf Q'\mathbf D'=(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}(\mathbf D\mathbf Q)'=\mathbf 0 \tag{14}\]
y por tanto
\[ \mathrm{Avar}(\mathbf b_{iv})-\sigma^2(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}=\sigma^2\mathbf D\boldsymbol\Sigma_{zz}\mathbf D'\ \succeq\ 0 . \tag{15}\]
Existe, pues, un estimador de la misma familia (el del punto 7) con varianza asintótica menor: \(\mathbf b_{iv}\) es asintóticamente ineficiente. La desigualdad es estricta salvo que \(\mathbf D=\mathbf 0\); en particular, si \(l=k\), \(\mathbf Q\) es cuadrada e invertible y \(\mathbf A=\mathbf Q^{-1}=\mathbf B\), de modo que con \(l>k\) es cuando se pierde eficiencia.
Con \(z_1\sim N(0,1)\), \(z_2\sim N(0,4)\) y \(x=z_1+z_2/4+v\) (con \(v\) correlacionada con \(u\)) se tiene \(\mathbf Q=(1,1)'\) y \(\boldsymbol\Sigma_{zz}=\mathrm{diag}(1,4)\). La teoría da \(\mathrm{Avar}(\mathbf b_{iv})/\sigma^2=\tfrac14(1+4)=1.25\) frente a la cota \((\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}=0.8\). Una simulación con \(n=2000\) y 3000 réplicas dio \(1.26\) y \(0.82\), y ambos estimadores centrados en \(\beta=1\) (consistencia).
\(\mathbf b_{iv}\) equivale a MCO de \(\mathbf Z'\mathbf y\) sobre \(\mathbf Z'\mathbf X\): usa los \(l\) momentos \(\mathbf Z'\mathbf u\) con pesos iguales, ignorando que tienen distinta varianza y están correlacionados. Eso es lo que se corrige en el punto 7.
Punto 7. Estimador eficiente: mínimos cuadrados en dos etapas (MC2E)
Enunciado: en el punto 6, hallar el estimador eficiente. ¿Qué estimador es?
- Generalizar \(\mathbf b_{iv}\) con una matriz de pesos \(\mathbf W\): \(\mathbf b_W=(\mathbf X'\mathbf Z\mathbf W\mathbf Z'\mathbf X)^{-1}\mathbf X'\mathbf Z\mathbf W\mathbf Z'\mathbf y\) (en el punto 6, \(\mathbf W=\mathbf I\)).
- Mostrar que el peso óptimo es \(\mathbf W=\boldsymbol\Sigma_{zz}^{-1}\), es decir \((\mathbf Z'\mathbf Z)^{-1}\) en muestra.
- Escribir el estimador resultante y reconocerlo como MC2E.
Solución.
Peso óptimo. Para cada \(\mathbf W\) simétrica definida positiva, \(\mathbf A_W=(\mathbf Q'\mathbf W\mathbf Q)^{-1}\mathbf Q'\mathbf W\) cumple \(\mathbf A_W\mathbf Q=\mathbf I\) y \(\mathrm{Avar}(\mathbf b_W)=\sigma^2\mathbf A_W\boldsymbol\Sigma_{zz}\mathbf A_W'\). Con el mismo argumento de Ecuación 14, comparando con \(\mathbf B\) (que es \(\mathbf A_W\) con \(\mathbf W=\boldsymbol\Sigma_{zz}^{-1}\)), \(\mathbf D=\mathbf A_W-\mathbf B\) cumple \(\mathbf D\mathbf Q=\mathbf 0\) y
\[ \mathrm{Avar}(\mathbf b_W)-\sigma^2(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}=\sigma^2\mathbf D\boldsymbol\Sigma_{zz}\mathbf D'\succeq 0 . \tag{16}\]
La cota se alcanza con \(\mathbf W=\boldsymbol\Sigma_{zz}^{-1}\). En muestra se usa \(\mathbf W=(\mathbf Z'\mathbf Z)^{-1}\).
Estimador. Con \(\mathbf P_z=\mathbf Z(\mathbf Z'\mathbf Z)^{-1}\mathbf Z'\) (simétrica e idempotente):
\[ \mathbf b_{MC2E}=\big[\mathbf X'\mathbf Z(\mathbf Z'\mathbf Z)^{-1}\mathbf Z'\mathbf X\big]^{-1}\mathbf X'\mathbf Z(\mathbf Z'\mathbf Z)^{-1}\mathbf Z'\mathbf y =(\mathbf X'\mathbf P_z\mathbf X)^{-1}\mathbf X'\mathbf P_z\mathbf y , \tag{17}\]
con varianza asintótica \(\sigma^2(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}\), que se estima con \(\hat\sigma^2(\mathbf X'\mathbf P_z\mathbf X)^{-1}\), donde \(\hat\sigma^2=\tfrac1n(\mathbf y-\mathbf X\mathbf b_{MC2E})'(\mathbf y-\mathbf X\mathbf b_{MC2E})\) usa los residuos con \(\mathbf X\) original, no con \(\hat{\mathbf X}\).
Por qué se llama “en dos etapas”. Sea \(\hat{\mathbf X}=\mathbf P_z\mathbf X\) (valores ajustados de regresar cada columna de \(\mathbf X\) sobre \(\mathbf Z\); etapa 1). Como \(\mathbf P_z\) es simétrica e idempotente, \(\hat{\mathbf X}'\hat{\mathbf X}=\mathbf X'\mathbf P_z\mathbf X\) y \(\hat{\mathbf X}'\mathbf y=\mathbf X'\mathbf P_z\mathbf y\), de modo que
\[ \mathbf b_{MC2E}=(\hat{\mathbf X}'\hat{\mathbf X})^{-1}\hat{\mathbf X}'\mathbf y \tag{18}\]
es MCO de \(\mathbf y\) sobre \(\hat{\mathbf X}\) (etapa 2).
La etapa 1 conserva de \(\mathbf X\) solo la parte explicada por los instrumentos (la parte “limpia”, no correlacionada con \(\mathbf u\) en el límite). Si \(l=k\), la fórmula se reduce al estimador de variables instrumentales simple \((\mathbf Z'\mathbf X)^{-1}\mathbf Z'\mathbf y\). Bajo \(\mathrm{Var}(\mathbf u)=\sigma^2\mathbf I\) el MC2E es el más eficiente de esta familia; con heterocedasticidad la generalización es el MGM.
Bloque C. Máxima verosimilitud con disturbios esféricos (puntos 8 a 11)
Punto 8. Normal multivariada con observaciones independientes
Enunciado: si \(\mathbf X\sim N_n(\boldsymbol\mu,\boldsymbol\Sigma)\) con densidad conjunta
\[ f_X(\mathbf x)=\frac{1}{(2\pi)^{n/2}|\boldsymbol\Sigma|^{1/2}}\exp\Big[-\tfrac12(\mathbf x-\boldsymbol\mu)'\boldsymbol\Sigma^{-1}(\mathbf x-\boldsymbol\mu)\Big], \tag{19}\]
y las \(X_i\) son independientes, probar que \(-\tfrac12(\mathbf x-\boldsymbol\mu)'\boldsymbol\Sigma^{-1}(\mathbf x-\boldsymbol\mu)=-\tfrac12\sum_{i=1}^n\dfrac{(X_i-\mu_i)^2}{\sigma_i^2}\).
- Independencia \(\Rightarrow\) \(\sigma_{ij}=\mathrm{Cov}(X_i,X_j)=0\) para \(i\ne j\) \(\Rightarrow\) \(\boldsymbol\Sigma\) diagonal.
- Invertir la matriz diagonal.
- Desarrollar la forma cuadrática.
Solución. Por independencia las covarianzas son cero, así que \(\boldsymbol\Sigma=\mathrm{diag}(\sigma_1^2,\dots,\sigma_n^2)\) y su inversa es la diagonal de los recíprocos: \(\boldsymbol\Sigma^{-1}=\mathrm{diag}(1/\sigma_1^2,\dots,1/\sigma_n^2)\). Entonces
\[ (\mathbf x-\boldsymbol\mu)'\boldsymbol\Sigma^{-1}(\mathbf x-\boldsymbol\mu) =\sum_{i=1}^n(x_i-\mu_i)\,\frac{1}{\sigma_i^2}\,(x_i-\mu_i) =\sum_{i=1}^n\frac{(x_i-\mu_i)^2}{\sigma_i^2}, \tag{20}\]
(no hay términos cruzados porque la matriz es diagonal) y al multiplicar por \(-\tfrac12\) se obtiene lo pedido.
Caso de igual varianza (el taller indica que no hay que probarlo): si todas las \(X_i\sim N(\mu,\sigma^2)\), entonces \(\sigma_i^2=\sigma^2\) y el exponente queda \(-\dfrac{1}{2\sigma^2}\sum_{i=1}^n(X_i-\mu)^2\).
Con \(\boldsymbol\Sigma\) diagonal, \(|\boldsymbol\Sigma|=\prod\sigma_i^2\) y la densidad conjunta Ecuación 19 se factoriza en el producto de las \(n\) densidades normales marginales, que es lo que debe pasar bajo independencia. Este es el mecanismo que aparece en el punto 9, con \(\mu_i=\mathbf x_i'\boldsymbol\beta\).
Punto 9. Verosimilitud y log-verosimilitud del modelo lineal
Enunciado: en \(\mathbf y=\mathbf X\boldsymbol\beta+\mathbf u\) con \(\mathbf u\sim N(\mathbf 0,\sigma^2\mathbf I)\), probar que la función de verosimilitud de \(y_1|\mathbf x_1,\dots,y_n|\mathbf x_n\) es \(L=(2\pi\sigma^2)^{-n/2}\exp\big[-\tfrac{1}{2\sigma^2}\sum_{t=1}^n(y_t-\mathbf x_t'\boldsymbol\beta)^2\big]\) y obtener el log de la verosimilitud.
- Escribir el modelo fila a fila: \(y_t=\mathbf x_t'\boldsymbol\beta+u_t\), con \(u_t\sim N(0,\sigma^2)\).
- Obtener \(y_t|\mathbf x_t\sim N(\mathbf x_t'\boldsymbol\beta,\sigma^2)\) (reproductividad normal) y su densidad.
- Justificar independencia entre observaciones y multiplicar las densidades.
- Simplificar productos y tomar logaritmo.
Solución.
Pasos 1–2. \(\mathbf x_t'=(1,x_{2,t},\dots,x_{k,t})\) es la fila \(t\) de \(\mathbf X\). Dado \(\mathbf x_t\) (constante), \(y_t\) es una función lineal de \(u_t\sim N(0,\sigma^2)\), así que por la reproductividad normal \(y_t\,|\,\mathbf x_t\sim N(\mathbf x_t'\boldsymbol\beta,\sigma^2)\), con densidad
\[ f(y_t\,|\,\mathbf x_t;\boldsymbol\beta,\sigma^2)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp\Big[-\frac{(y_t-\mathbf x_t'\boldsymbol\beta)^2}{2\sigma^2}\Big]. \tag{21}\]
Paso 3. \(\mathrm{Var}(\mathbf u)=\sigma^2\mathbf I\) implica que los \(u_t\) son no correlacionados; siendo conjuntamente normales, son independientes, y por tanto también los \(y_t|\mathbf x_t\). La densidad conjunta (la verosimilitud) es el producto:
\[ L(\boldsymbol\beta,\sigma^2)=\prod_{t=1}^n\frac{1}{\sqrt{2\pi\sigma^2}}\exp\Big[-\frac{(y_t-\mathbf x_t'\boldsymbol\beta)^2}{2\sigma^2}\Big] =(2\pi\sigma^2)^{-n/2}\exp\Big[-\frac{1}{2\sigma^2}\sum_{t=1}^n(y_t-\mathbf x_t'\boldsymbol\beta)^2\Big]. \tag{22}\]
Se usó que \(\prod_{t=1}^n(2\pi\sigma^2)^{-1/2}=(2\pi\sigma^2)^{-n/2}\) y que el producto de exponenciales es la exponencial de la suma.
Paso 4. Tomando logaritmo natural:
\[ \ell(\boldsymbol\beta,\sigma^2)=-\frac n2\ln(2\pi)-\frac n2\ln\sigma^2-\frac{1}{2\sigma^2}\sum_{t=1}^n(y_t-\mathbf x_t'\boldsymbol\beta)^2 . \tag{23}\]
La verosimilitud mide qué tan “plausible” es cada \((\boldsymbol\beta,\sigma^2)\) dados los datos; la suma de cuadrados \(\sum(y_t-\mathbf x_t'\boldsymbol\beta)^2\) que aparece en el exponente es la misma que minimiza MCO. Ahí está la conexión MCO–MV bajo normalidad.
Punto 10. La suma de cuadrados en forma matricial
Enunciado: como \(u_t=y_t-\mathbf x_t'\boldsymbol\beta\), probar que \(\sum_{t=1}^nu_t^2=\mathbf u'\mathbf u=\mathbf y'\mathbf y-2(\mathbf X'\mathbf y)'\boldsymbol\beta+\boldsymbol\beta'(\mathbf X'\mathbf X)\boldsymbol\beta\).
Solución. (i) \(\sum u_t^2=\mathbf u'\mathbf u\) por definición de producto interno. (ii) \(\mathbf u=\mathbf y-\mathbf X\boldsymbol\beta\), luego
\[ \mathbf u'\mathbf u=(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta) =\mathbf y'\mathbf y-\mathbf y'\mathbf X\boldsymbol\beta-\boldsymbol\beta'\mathbf X'\mathbf y+\boldsymbol\beta'\mathbf X'\mathbf X\boldsymbol\beta . \tag{24}\]
- \(\mathbf y'\mathbf X\boldsymbol\beta\) es un escalar, así que es igual a su transpuesta \(\boldsymbol\beta'\mathbf X'\mathbf y=(\mathbf X'\mathbf y)'\boldsymbol\beta\). Los dos términos del medio se suman:
\[ \mathbf u'\mathbf u=\mathbf y'\mathbf y-2(\mathbf X'\mathbf y)'\boldsymbol\beta+\boldsymbol\beta'(\mathbf X'\mathbf X)\boldsymbol\beta . \tag{25}\]
Sustituyendo en Ecuación 23 (resultado inmediato, “solo es reemplazar”):
\[ \ell(\boldsymbol\beta,\sigma^2)=-\frac n2\ln(2\pi)-\frac n2\ln\sigma^2-\frac{1}{2\sigma^2}\Big[\mathbf y'\mathbf y-2(\mathbf X'\mathbf y)'\boldsymbol\beta+\boldsymbol\beta'\mathbf X'\mathbf X\boldsymbol\beta\Big]. \tag{26}\]
Punto 11. EMV de \(\boldsymbol\beta\) y \(\sigma^2\) (caso esférico)
Enunciado: maximizar Ecuación 26 y obtener los estimadores de \(\boldsymbol\beta\) y \(\sigma^2\).
Empieza escribiendo Ecuación 26 (log-verosimilitud en forma matricial) y di que la usas del punto 10. Luego: (1) derivar respecto a \(\boldsymbol\beta\) e igualar a cero; (2) derivar respecto a \(\sigma^2\) y sustituir \(\boldsymbol\beta\); (3) comprobar condiciones de segundo orden.
Solución.
Derivada respecto a \(\boldsymbol\beta\). Usando \(\partial(\mathbf a'\boldsymbol\beta)/\partial\boldsymbol\beta=\mathbf a\) y \(\partial(\boldsymbol\beta'\mathbf M\boldsymbol\beta)/\partial\boldsymbol\beta=2\mathbf M\boldsymbol\beta\) (con \(\mathbf M\) simétrica):
\[ \frac{\partial\ell}{\partial\boldsymbol\beta}=-\frac{1}{2\sigma^2}\big[-2\mathbf X'\mathbf y+2\mathbf X'\mathbf X\boldsymbol\beta\big]=\frac{1}{\sigma^2}\mathbf X'(\mathbf y-\mathbf X\boldsymbol\beta)=\mathbf 0 \ \Longrightarrow\ \hat{\boldsymbol\beta}=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y=\mathbf b . \tag{27}\]
Derivada respecto a \(\sigma^2\).
\[ \frac{\partial\ell}{\partial\sigma^2}=-\frac{n}{2\sigma^2}+\frac{1}{2\sigma^4}(\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta)=0 \ \Longrightarrow\ \hat\sigma^2=\frac1n(\mathbf y-\mathbf X\hat{\boldsymbol\beta})'(\mathbf y-\mathbf X\hat{\boldsymbol\beta})=\frac{\mathbf e'\mathbf e}{n}=\frac{RSS}{n}. \tag{28}\]
Condiciones de segundo orden. \(\partial^2\ell/\partial\boldsymbol\beta\,\partial\boldsymbol\beta'=-\mathbf X'\mathbf X/\sigma^2\) es definida negativa (porque \(\mathbf X\) tiene rango \(k\)); \(\partial^2\ell/\partial(\sigma^2)^2\) evaluada en \(\hat\sigma^2\) es \(-n/(2\hat\sigma^4)<0\); y el cruce \(\partial^2\ell/\partial\boldsymbol\beta\,\partial\sigma^2=-\mathbf X'(\mathbf y-\mathbf X\boldsymbol\beta)/\sigma^4\) se anula en \(\hat{\boldsymbol\beta}\) (porque \(\mathbf X'\mathbf e=\mathbf 0\)). La Hessiana es entonces definida negativa y el punto es un máximo.
Valor máximo (útil para el \(LR\) del punto 15):
\[ \ell(\hat{\boldsymbol\beta},\hat\sigma^2)=-\frac n2\Big[\ln(2\pi)+\ln\frac{\mathbf e'\mathbf e}{n}+1\Big]. \tag{29}\]
\(\hat{\boldsymbol\beta}_{MV}=\mathbf b\): bajo normalidad, MV y MCO dan el mismo estimador de \(\boldsymbol\beta\). En cambio \(\hat\sigma^2=RSS/n\) es sesgado (\(E(\hat\sigma^2)=\sigma^2(n-k)/n\)) pero consistente; el insesgado es \(S^2=RSS/(n-k)\). Ambos coinciden cuando \(n\to\infty\).
Bloque D. Máxima verosimilitud con disturbios no esféricos (punto 12)
Punto 12. Log-verosimilitud y EMV con \(\boldsymbol\Omega\) conocida
Enunciado: en \(\mathbf y=\mathbf X\boldsymbol\beta+\mathbf u\) con \(\mathbf u\sim N(\mathbf 0,\sigma^2\boldsymbol\Omega)\) y \(\boldsymbol\Omega\) conocida, la densidad de \(\mathbf u\) es
\[ f(\mathbf u)=(2\pi)^{-n/2}|\sigma^2\boldsymbol\Omega|^{-1/2}\exp\Big[-\tfrac12\mathbf u'(\sigma^2\boldsymbol\Omega)^{-1}\mathbf u\Big]. \tag{30}\]
Usando \(|\sigma^2\boldsymbol\Omega|=(\sigma^2)^n|\boldsymbol\Omega|\), probar el log de la verosimilitud y maximizarlo respecto a \(\boldsymbol\beta\) y \(\sigma^2\).
El enunciado escribe \(\sigma^{2n}\) y usa corchetes de “piso” \(\lfloor\cdot\rfloor\) para el determinante. Debe leerse \((\sigma^2)^n\) (no \(\sigma^n\)) y \(|\cdot|\). La identidad es \(|c\mathbf A|=c^n|\mathbf A|\) para una matriz \(\mathbf A\) de orden \(n\times n\), aquí con \(c=\sigma^2\).
- Sustituir \(|\sigma^2\boldsymbol\Omega|=(\sigma^2)^n|\boldsymbol\Omega|\) y \((\sigma^2\boldsymbol\Omega)^{-1}=\sigma^{-2}\boldsymbol\Omega^{-1}\) en la densidad.
- Pasar de la densidad de \(\mathbf u\) a la de \(\mathbf y\): \(\mathbf u=\mathbf y-\mathbf X\boldsymbol\beta\) (traslación, jacobiano 1).
- Tomar logaritmo.
- Derivar respecto a \(\boldsymbol\beta\) y \(\sigma^2\).
Solución.
Pasos 1–2.
\[ L(\boldsymbol\beta,\sigma^2)=(2\pi)^{-n/2}(\sigma^2)^{-n/2}|\boldsymbol\Omega|^{-1/2}\exp\Big[-\frac{1}{2\sigma^2}(\mathbf y-\mathbf X\boldsymbol\beta)'\boldsymbol\Omega^{-1}(\mathbf y-\mathbf X\boldsymbol\beta)\Big]. \tag{31}\]
Paso 3.
\[ \ell(\boldsymbol\beta,\sigma^2)=-\frac n2\ln(2\pi)-\frac n2\ln\sigma^2-\frac12\ln|\boldsymbol\Omega|-\frac{1}{2\sigma^2}(\mathbf y-\mathbf X\boldsymbol\beta)'\boldsymbol\Omega^{-1}(\mathbf y-\mathbf X\boldsymbol\beta). \tag{32}\]
Paso 4. Como \(\boldsymbol\Omega\) es conocida, el término \(-\tfrac12\ln|\boldsymbol\Omega|\) no depende de los parámetros y no afecta la maximización. Para \(\boldsymbol\beta\), usando que \(\boldsymbol\Omega^{-1}\) es simétrica:
\[ \frac{\partial\ell}{\partial\boldsymbol\beta}=\frac{1}{\sigma^2}\mathbf X'\boldsymbol\Omega^{-1}(\mathbf y-\mathbf X\boldsymbol\beta)=\mathbf 0 \ \Longrightarrow\ \hat{\boldsymbol\beta}=(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\mathbf y , \tag{33}\]
y para \(\sigma^2\):
\[ \frac{\partial\ell}{\partial\sigma^2}=-\frac{n}{2\sigma^2}+\frac{1}{2\sigma^4}(\mathbf y-\mathbf X\boldsymbol\beta)'\boldsymbol\Omega^{-1}(\mathbf y-\mathbf X\boldsymbol\beta)=0 \ \Longrightarrow\ \hat\sigma^2=\frac1n(\mathbf y-\mathbf X\hat{\boldsymbol\beta})'\boldsymbol\Omega^{-1}(\mathbf y-\mathbf X\hat{\boldsymbol\beta}). \tag{34}\]
La Hessiana en \(\boldsymbol\beta\) es \(-\mathbf X'\boldsymbol\Omega^{-1}\mathbf X/\sigma^2\), definida negativa (porque \(\boldsymbol\Omega^{-1}\) es definida positiva y \(\mathbf X\) tiene rango \(k\)); por tanto es un máximo.
\(\hat{\boldsymbol\beta}_{MV}\) es exactamente el estimador de MCG del punto 3, y \(\hat\sigma^2\) es la RSS del modelo transformado entre \(n\): (\(\mathbf e_*'\mathbf e_*/n\) con \(\mathbf e_*=\boldsymbol\rho(\mathbf y-\mathbf X\hat{\boldsymbol\beta})\), pues \(\mathbf e'\boldsymbol\Omega^{-1}\mathbf e=\mathbf e'\boldsymbol\rho'\boldsymbol\rho\mathbf e\)). Con el punto 11 como caso particular (\(\boldsymbol\Omega=\mathbf I\)). En la práctica \(\boldsymbol\Omega\) no se conoce y se estima (MCG factible), pero eso no se pide aquí.
Bloque E. Estimación restringida y estadísticos de contraste (puntos 13 a 15)
En los tres puntos, \(H_0:\mathbf R\boldsymbol\beta=\mathbf r\) con \(\mathbf R\) de orden \(q\times k\) y rango fila \(q\) (supuesto no enunciado en el taller pero necesario para que \(\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\) sea invertible). Se usa la abreviatura
\[ \mathbf M=\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\quad(q\times q,\ \text{simétrica definida positiva}). \tag{35}\]
Punto 13. MCO restringido
Enunciado: obtener \(\mathbf b_*\) (estimador de \(\boldsymbol\beta\) bajo \(H_0\)) optimizando la RSS restringida \(\varphi=(\mathbf y-\mathbf X\mathbf b_*)'(\mathbf y-\mathbf X\mathbf b_*)-2\boldsymbol\lambda'(\mathbf R\mathbf b_*-\mathbf r)\). Debe llegar a \(\mathbf b_*=\mathbf b+(\mathbf X'\mathbf X)^{-1}\mathbf R'[\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R']^{-1}(\mathbf r-\mathbf R\mathbf b)\).
El enunciado dice “maximizando la RSS restringida”; se minimiza (queremos la menor suma de cuadrados que respete la restricción). El procedimiento (Lagrangiano) es el mismo.
- Derivar \(\varphi\) respecto a \(\mathbf b_*\) e igualar a cero (CPO 1).
- Despejar \(\mathbf b_*\) en función de \(\mathbf b\) y \(\boldsymbol\lambda\).
- Imponer la restricción \(\mathbf R\mathbf b_*=\mathbf r\) (CPO 2) y despejar \(\boldsymbol\lambda\).
- Sustituir \(\boldsymbol\lambda\).
Solución.
CPO 1.
\[ \frac{\partial\varphi}{\partial\mathbf b_*}=-2\mathbf X'\mathbf y+2\mathbf X'\mathbf X\mathbf b_*-2\mathbf R'\boldsymbol\lambda=\mathbf 0 \ \Longrightarrow\ \mathbf b_*=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf y+(\mathbf X'\mathbf X)^{-1}\mathbf R'\boldsymbol\lambda=\mathbf b+(\mathbf X'\mathbf X)^{-1}\mathbf R'\boldsymbol\lambda . \tag{36}\]
CPO 2 y multiplicador. La derivada respecto a \(\boldsymbol\lambda\) devuelve la restricción, \(\mathbf R\mathbf b_*=\mathbf r\). Premultiplicando Ecuación 36 por \(\mathbf R\):
\[ \mathbf r=\mathbf R\mathbf b+\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\boldsymbol\lambda=\mathbf R\mathbf b+\mathbf M\boldsymbol\lambda \ \Longrightarrow\ \boldsymbol\lambda=\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b). \tag{37}\]
Resultado.
\[ \mathbf b_*=\mathbf b+(\mathbf X'\mathbf X)^{-1}\mathbf R'\big[\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\big]^{-1}(\mathbf r-\mathbf R\mathbf b). \tag{38}\]
\(\mathbf b_*\) es el estimador MCO corregido por cuánto incumple la restricción el estimador libre: \((\mathbf r-\mathbf R\mathbf b)\). Si \(\mathbf R\mathbf b=\mathbf r\), no hay corrección y \(\mathbf b_*=\mathbf b\). El problema es convexo (función cuadrática convexa con restricción lineal), de modo que la solución de las CPO es un mínimo.
Punto 14. Diferencia de sumas de cuadrados
Enunciado: con \(\mathbf e=\mathbf y-\mathbf X\mathbf b\) y \(\mathbf e_*=\mathbf y-\mathbf X\mathbf b_*\), probar
\[ \mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e=(\mathbf r-\mathbf R\mathbf b)'\big[\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\big]^{-1}(\mathbf r-\mathbf R\mathbf b). \tag{39}\]
- Escribir \(\mathbf e_*=\mathbf e-\mathbf X(\mathbf b_*-\mathbf b)\).
- Expandir \(\mathbf e_*'\mathbf e_*\); el término cruzado desaparece por \(\mathbf X'\mathbf e=\mathbf 0\).
- Sustituir \(\mathbf b_*-\mathbf b\) de Ecuación 38 y simplificar.
Solución. Se parte de Ecuación 38, que da \(\mathbf b_*-\mathbf b=(\mathbf X'\mathbf X)^{-1}\mathbf R'\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b)\).
Pasos 1–2. \(\mathbf e_*=\mathbf y-\mathbf X\mathbf b-\mathbf X(\mathbf b_*-\mathbf b)=\mathbf e-\mathbf X(\mathbf b_*-\mathbf b)\). Entonces
\[ \mathbf e_*'\mathbf e_*=\mathbf e'\mathbf e-2(\mathbf b_*-\mathbf b)'\underbrace{\mathbf X'\mathbf e}_{=\ \mathbf 0}+(\mathbf b_*-\mathbf b)'\mathbf X'\mathbf X(\mathbf b_*-\mathbf b) \ \Longrightarrow\ \mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e=(\mathbf b_*-\mathbf b)'\mathbf X'\mathbf X(\mathbf b_*-\mathbf b). \tag{40}\]
(\(\mathbf X'\mathbf e=\mathbf 0\) son las ecuaciones normales de MCO.)
Paso 3. Sustituyendo \(\mathbf b_*-\mathbf b\):
\[ \begin{aligned} (\mathbf b_*-\mathbf b)'\mathbf X'\mathbf X(\mathbf b_*-\mathbf b) &=(\mathbf r-\mathbf R\mathbf b)'\mathbf M^{-1}\mathbf R(\mathbf X'\mathbf X)^{-1}\,\mathbf X'\mathbf X\,(\mathbf X'\mathbf X)^{-1}\mathbf R'\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b)\\[2pt] &=(\mathbf r-\mathbf R\mathbf b)'\mathbf M^{-1}\underbrace{\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'}_{=\ \mathbf M}\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b)\\[2pt] &=(\mathbf r-\mathbf R\mathbf b)'\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b). \end{aligned} \tag{41}\]
La RSS restringida es siempre mayor o igual a la libre (\(\mathbf M^{-1}\) es definida positiva, el lado derecho es \(\ge 0\)): imponer una restricción no puede mejorar el ajuste. El aumento es una forma cuadrática en la “distancia” \(\mathbf r-\mathbf R\mathbf b\), que es lo que miden los tres contrastes.
Punto 15. \(F\), \(W\), \(LM\) y \(LR\) en términos de \(R^2_{NR}\) y \(R^2_R\)
Enunciado: para \(H_0:\mathbf R\boldsymbol\beta=\mathbf r\) contra \(H_1:\mathbf R\boldsymbol\beta\neq\mathbf r\), el estadístico
\[ F=\frac{(\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e)/q}{\mathbf e'\mathbf e/(n-k)} \tag{42}\]
- pasarlo a términos de \(R^2_{NR}\) y \(R^2_R\); (ii) explicar por qué el \(F\) de significancia global es \(\dfrac{R^2/(k-1)}{(1-R^2)/(n-k)}\); (iii) pasar a \(R^2_{NR}\) y \(R^2_R\) los estadísticos
\[ W=n\,\frac{\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e}{\mathbf e'\mathbf e},\qquad LM=n\,\frac{\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e}{\mathbf e_*'\mathbf e_*},\qquad LR=n\ln\frac{\mathbf e_*'\mathbf e_*}{\mathbf e'\mathbf e}. \tag{43}\]
Las dos regresiones (libre y restringida) tienen la misma variable dependiente \(\mathbf y\), luego la misma suma total de cuadrados \(TSS=\sum(y_t-\bar y)^2\). Por la definición \(R^2=1-RSS/TSS\):
\[ \mathbf e'\mathbf e=TSS\,(1-R^2_{NR}),\qquad \mathbf e_*'\mathbf e_*=TSS\,(1-R^2_R),\qquad \mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e=TSS\,(R^2_{NR}-R^2_R). \tag{44}\]
La \(TSS\) se cancela en todos los cocientes.
(i) \(F\) en términos de \(R^2\). Sustituyendo Ecuación 44 en Ecuación 42:
\[ F=\frac{(R^2_{NR}-R^2_R)/q}{(1-R^2_{NR})/(n-k)} . \tag{45}\]
(ii) \(F\) de significancia global. La hipótesis es \(H_0:\beta_2=\dots=\beta_k=0\) (todas las pendientes), con \(q=k-1\) restricciones. El modelo restringido solo tiene el intercepto, \(y_t=\beta_1+u_t\), cuyo MCO es \(b_{*1}=\bar y\) y su \(RSS_*=\sum(y_t-\bar y)^2=TSS\). Por tanto \(R^2_R=1-TSS/TSS=0\). Sustituyendo en Ecuación 45 (y llamando \(R^2=R^2_{NR}\)):
\[ F=\frac{R^2/(k-1)}{(1-R^2)/(n-k)} . \tag{46}\]
(iii) \(W\), \(LM\) y \(LR\). Con Ecuación 44:
\[ W=\frac{n\,(R^2_{NR}-R^2_R)}{1-R^2_{NR}},\qquad LM=\frac{n\,(R^2_{NR}-R^2_R)}{1-R^2_R},\qquad LR=n\ln\frac{1-R^2_R}{1-R^2_{NR}} . \tag{47}\]
De dónde sale el \(LR\) (por si el profesor lo pregunta): \(LR=2(\ell-\ell_*)\), con \(\ell\) de Ecuación 29 y \(\ell_*\) la log-verosimilitud con \(\bar\sigma^2=\mathbf e_*'\mathbf e_*/n\) bajo \(H_0\). La parte común \(-\tfrac n2[\ln 2\pi+1]\) se cancela y queda \(LR=n\ln(\mathbf e_*'\mathbf e_*/\mathbf e'\mathbf e)\).
Con \(x=(\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e)/\mathbf e'\mathbf e\) (aumento relativo de la RSS): \(W=nx\), \(LR=n\ln(1+x)\), \(LM=nx/(1+x)\), y \(F=\dfrac{n-k}{qn}W\). Como \(x\ge\ln(1+x)\ge x/(1+x)\), siempre \(W\ge LR\ge LM\). Las cuatro miden lo mismo: cuánto se pierde de ajuste al imponer \(H_0\). Con muestra grande \(W\), \(LM\) y \(LR\) se distribuyen \(\chi^2_q\) bajo \(H_0\).
- El taller escribe \(LR=n\ln(\mathbf e_*\mathbf e_*/\mathbf e'\mathbf e)\) sin las primas (debe ser \(\mathbf e_*'\mathbf e_*\)).
- Dice “los tres estadísticos de razón de verosimilitud”: solo el \(LR\) lo es literalmente; \(W\), \(LM\) y \(LR\) forman la “trinidad” de contrastes asintóticos.
- \(R^2_R\) se define como \(1-RSS_*/TSS\) con la \(TSS\) centrada (la del modelo libre); si el modelo restringido no tuviera intercepto, este \(R^2_R\) podría salir negativo, pero la igualdad Ecuación 44 sigue valiendo.
Bloque F. Distribuciones exactas y asintóticas (punto 16)
Punto 16 (misceláneo, no evaluable). Distribución de \(\mathbf b\) y de \(W\)
Enunciado: si \(\mathbf X\sim N(\boldsymbol\mu,\boldsymbol\Sigma)\) entonces \(\mathbf Y=\mathbf F\mathbf X+\mathbf C\sim N(\mathbf F\boldsymbol\mu+\mathbf C,\mathbf F\boldsymbol\Sigma\mathbf F')\) (reproductividad normal), y si \(\boldsymbol\mu=\mathbf 0\), \(\mathbf X'\mathbf A\mathbf X\sim\chi^2_q\) con \(q=\mathrm{rango}(\mathbf A)\). Con \(\mathbf u\sim N(\mathbf 0,\sigma^2\mathbf I)\), probar que (a) \(\mathbf b\sim N(\boldsymbol\beta,\sigma^2(\mathbf X'\mathbf X)^{-1})\); (b) bajo \(H_0\), \((\mathbf R\mathbf b-\mathbf r)'[\mathbf R\sigma^2(\mathbf X'\mathbf X)^{-1}\mathbf R']^{-1}(\mathbf R\mathbf b-\mathbf r)\sim\chi^2_q\); (c) que reemplazando \(\sigma^2\) por \(\hat\sigma^2\), \(W\xrightarrow{d}\chi^2_q\).
- El resultado “\(\mathbf X'\mathbf A\mathbf X\sim\chi^2_q\) con \(q=\mathrm{rango}(\mathbf A)\)” requiere que \(\mathbf X\sim N(\mathbf 0,\mathbf I)\) y \(\mathbf A\) sea simétrica e idempotente. Para una normal con covarianza general \(\boldsymbol\Sigma\) el análogo es \(\mathbf X'\boldsymbol\Sigma^{-1}\mathbf X\sim\chi^2_q\). La prueba de (b) a continuación se cuida de esto estandarizando primero.
- “\(\hat\sigma^2=S^2=RSS/n\)” mezcla dos estimadores: \(RSS/n\) es el EMV \(\hat\sigma^2\) y \(S^2=RSS/(n-k)\) es el insesgado (Ecuación 28). Aquí se usa \(\hat\sigma^2=RSS/n\), como en el \(W\) del punto 15.
- La numeración “8.1” dentro del punto 16 es un resto de otra versión del taller.
- Escribir \(\mathbf b=\boldsymbol\beta+(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf u\) y aplicar la reproductividad con \(\mathbf F=(\mathbf X'\mathbf X)^{-1}\mathbf X'\), \(\mathbf C=\boldsymbol\beta\).
- Aplicar la reproductividad de nuevo con \(\mathbf F=\mathbf R\), \(\mathbf C=-\mathbf r\); estandarizar con una matriz \(\mathbf P\) y usar que una suma de \(q\) normales estándar al cuadrado es \(\chi^2_q\).
- Sustituir \(\sigma^2\) por \(\hat\sigma^2\) y usar Slutsky.
Solución.
(a) \(\mathbf b=\boldsymbol\beta+\mathbf F\mathbf u\) con \(\mathbf F=(\mathbf X'\mathbf X)^{-1}\mathbf X'\) (\(k\times n\)) y \(\mathbf C=\boldsymbol\beta\). Por reproductividad, \(\mathbf b\sim N\big(\boldsymbol\beta,\ \sigma^2\mathbf F\mathbf F'\big)\) con
\[ \mathbf F\mathbf F'=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf X(\mathbf X'\mathbf X)^{-1}=(\mathbf X'\mathbf X)^{-1} \quad\Longrightarrow\quad \mathbf b\sim N\big(\boldsymbol\beta,\ \sigma^2(\mathbf X'\mathbf X)^{-1}\big). \tag{48}\]
(b) Aplicando la reproductividad a \(\mathbf b\) con \(\mathbf F=\mathbf R\) y \(\mathbf C=-\mathbf r\): \(\mathbf R\mathbf b-\mathbf r\sim N\big(\mathbf R\boldsymbol\beta-\mathbf r,\ \sigma^2\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'\big)\). Bajo \(H_0\), \(\mathbf R\boldsymbol\beta=\mathbf r\), así que la media es \(\mathbf 0\). Sea \(\mathbf V=\sigma^2\mathbf R(\mathbf X'\mathbf X)^{-1}\mathbf R'=\sigma^2\mathbf M\) (definida positiva) y \(\mathbf V=\mathbf P\mathbf P'\) su factorización de Cholesky. Defina
\[ \mathbf w=\mathbf P^{-1}(\mathbf R\mathbf b-\mathbf r)\sim N\big(\mathbf 0,\ \mathbf P^{-1}\mathbf V\mathbf P^{-1\prime}\big)=N(\mathbf 0,\mathbf I_q). \tag{49}\]
Entonces
\[ \mathbf w'\mathbf w=(\mathbf R\mathbf b-\mathbf r)'\mathbf P^{-1\prime}\mathbf P^{-1}(\mathbf R\mathbf b-\mathbf r)=(\mathbf R\mathbf b-\mathbf r)'\mathbf V^{-1}(\mathbf R\mathbf b-\mathbf r)=\sum_{i=1}^qw_i^2\ \sim\ \chi^2_q . \tag{50}\]
En la notación del taller, \(\mathbf X\to\mathbf w\) y \(\mathbf A=\mathbf I_q\) (simétrica, idempotente, de rango \(q\)).
(c) La cantidad de (b) usa \(\sigma^2\) desconocida. Con \(\hat\sigma^2\) en su lugar,
\[ W=\frac{(\mathbf R\mathbf b-\mathbf r)'\mathbf M^{-1}(\mathbf R\mathbf b-\mathbf r)}{\hat\sigma^2} =\frac{\sigma^2}{\hat\sigma^2}\cdot\underbrace{(\mathbf R\mathbf b-\mathbf r)'\mathbf V^{-1}(\mathbf R\mathbf b-\mathbf r)}_{\sim\ \chi^2_q}. \tag{51}\]
Como \(\hat\sigma^2\xrightarrow{p}\sigma^2\) (el EMV es consistente), \(\sigma^2/\hat\sigma^2\xrightarrow{p}1\) y, por el teorema de Slutsky, \(W\xrightarrow{d}\chi^2_q\) cuando \(n\to\infty\).
- Por el punto 14, \((\mathbf R\mathbf b-\mathbf r)'\mathbf M^{-1}(\mathbf R\mathbf b-\mathbf r)=\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e\), de modo que este \(W\) es el mismo \(W=n(\mathbf e_*'\mathbf e_*-\mathbf e'\mathbf e)/\mathbf e'\mathbf e\) del punto 15.
- Resultado exacto: si en lugar de \(\hat\sigma^2\) se usa \(S^2=RSS/(n-k)\), que es independiente de \(\mathbf b\) y cumple \((n-k)S^2/\sigma^2\sim\chi^2_{n-k}\), el cociente dividido por \(q\) es el \(F\) del punto 15 y se distribuye \(F_{q,\,n-k}\) exactamente, sin pedir muestra grande.
- En muestras finitas \(W\) tiende a rechazar de más: en una simulación (\(n=40\), \(k=3\), \(q=2\)) el \(W\) rechazó \(H_0\) cerca de \(7.5\%\) de las veces con nivel nominal \(5\%\); el \(F\) exacto corrige eso.
Errores y omisiones del taller
| Dónde | Qué dice | Qué debería decir | Tipo |
|---|---|---|---|
| Encabezado | \(\mathbf u\sim(\mathbf 0_{k\times1},\sigma^2\boldsymbol\Omega_{k\times k})\) | dimensiones \(n\times1\) y \(n\times n\) | D |
| Numeración | 1, 2, 3, 6, 7, … | los puntos 4 y 5 no existen (la lista de Word se reinicia) | D |
| 1 | “no es eficiente” | ineficiente en general; \(\mathbf b=\mathbf b_{MCG}\) si \(\boldsymbol\Omega\propto\mathbf I\) (y otros casos especiales) | O |
| 6 | no enuncia supuestos sobre \(\mathbf Z\) | exogeneidad, relevancia (rango \(k\)), \(\boldsymbol\Sigma_{zz}\) definida positiva, TCL | O |
| 12 | \(\sigma^{2n}\) y \(\lfloor\cdot\rfloor\) | \((\sigma^2)^n\) y \(\lvert\cdot\rvert\) (determinante) | D |
| 13 | “maximizando la RSS restringida” | minimizando | D |
| 13–15 | no menciona rango fila de \(\mathbf R\) | \(\mathrm{rango}(\mathbf R)=q\) para que \(\mathbf M\) sea invertible | O |
| 15 | \(LR=n\ln(\mathbf e_*\mathbf e_*/\mathbf e'\mathbf e)\) | \(\mathbf e_*'\mathbf e_*\) (faltan primas) | D |
| 16 | \(\mathbf X'\mathbf A\mathbf X\sim\chi^2_q\) para cualquier \(\mathbf A\) | \(\mathbf A\) simétrica idempotente y \(\mathbf X\sim N(\mathbf 0,\mathbf I)\); en general \(\mathbf X'\boldsymbol\Sigma^{-1}\mathbf X\) | E |
| 16 | \(\hat\sigma^2=S^2=RSS/n\) | \(\hat\sigma^2=RSS/n\) (EMV, sesgado); \(S^2=RSS/(n-k)\) (insesgado) | S |
Clave: D = desliz de notación, S = simplificación, E = error conceptual menor, O = omisión de supuesto o salvedad. Ninguno cambia el resultado final que pide el taller; si te toca uno de estos puntos, escribe el supuesto en una línea y sigue la ruta del profesor.
Esqueletos de una línea (para repasar justo antes del examen)
| Punto | Esqueleto |
|---|---|
| 2 | \(\mathbf b-\boldsymbol\beta=(\mathbf X'\mathbf X)^{-1}\mathbf X'\mathbf u\) \(\Rightarrow\) \(\mathrm{Var}=(\mathbf X'\mathbf X)^{-1}\mathbf X'(\sigma^2\boldsymbol\Omega)\mathbf X(\mathbf X'\mathbf X)^{-1}\) |
| 3 | \(\boldsymbol\rho\boldsymbol\Omega\boldsymbol\rho'=\mathbf I\) \(\Rightarrow\) Gauss–Markov \(\Rightarrow\) \(\mathbf b_{MCG}=(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\mathbf X'\boldsymbol\Omega^{-1}\mathbf y\), \(\mathrm{Var}=\sigma^2(\mathbf X'\boldsymbol\Omega^{-1}\mathbf X)^{-1}\) |
| 1 | \(\mathbf D=\mathbf C-\mathbf A\), \(\mathbf D\mathbf X=\mathbf 0\) \(\Rightarrow\) \(\mathrm{Var}(\mathbf b)-\mathrm{Var}(\mathbf b_{MCG})=\sigma^2\mathbf D\boldsymbol\Omega\mathbf D'\succeq0\) |
| 6 | \(\mathbf b_{iv}-\boldsymbol\beta=[\cdot]^{-1}(\tfrac1n\mathbf X'\mathbf Z)(\tfrac1n\mathbf Z'\mathbf u)\to\mathbf 0\); \(\mathrm{Avar}-\text{cota}=\sigma^2\mathbf D\boldsymbol\Sigma_{zz}\mathbf D'\) con \(\mathbf D\mathbf Q=\mathbf 0\) |
| 7 | peso \((\mathbf Z'\mathbf Z)^{-1}\) \(\Rightarrow\) \(\mathbf b=(\mathbf X'\mathbf P_z\mathbf X)^{-1}\mathbf X'\mathbf P_z\mathbf y\) = MC2E; \(\mathrm{Avar}=\sigma^2(\mathbf Q'\boldsymbol\Sigma_{zz}^{-1}\mathbf Q)^{-1}\) |
| 8 | independencia \(\Rightarrow\) \(\boldsymbol\Sigma\) diagonal \(\Rightarrow\) \((\mathbf x-\boldsymbol\mu)'\boldsymbol\Sigma^{-1}(\mathbf x-\boldsymbol\mu)=\sum(x_i-\mu_i)^2/\sigma_i^2\) |
| 9 | \(\prod f(y_t\mid\mathbf x_t)\) \(\Rightarrow\) \(L=(2\pi\sigma^2)^{-n/2}e^{-\sum(y_t-\mathbf x_t'\boldsymbol\beta)^2/2\sigma^2}\); \(\ell=-\tfrac n2\ln2\pi-\tfrac n2\ln\sigma^2-\tfrac{1}{2\sigma^2}\sum(\cdot)^2\) |
| 10 | \((\mathbf y-\mathbf X\boldsymbol\beta)'(\mathbf y-\mathbf X\boldsymbol\beta)\); el término cruzado es escalar y se duplica |
| 11 | \(\partial_{\boldsymbol\beta}\ell=0\Rightarrow\hat{\boldsymbol\beta}=\mathbf b\); \(\partial_{\sigma^2}\ell=0\Rightarrow\hat\sigma^2=\mathbf e'\mathbf e/n\) |
| 12 | \(\lvert\sigma^2\boldsymbol\Omega\rvert=(\sigma^2)^n\lvert\boldsymbol\Omega\rvert\) \(\Rightarrow\) \(\hat{\boldsymbol\beta}=\mathbf b_{MCG}\), \(\hat\sigma^2=\mathbf e'\boldsymbol\Omega^{-1}\mathbf e/n\) |
| 13 | \(\partial\varphi=0\Rightarrow\mathbf b_*=\mathbf b+(\mathbf X'\mathbf X)^{-1}\mathbf R'\boldsymbol\lambda\); \(\mathbf R\mathbf b_*=\mathbf r\Rightarrow\boldsymbol\lambda=\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b)\) |
| 14 | \(\mathbf e_*=\mathbf e-\mathbf X(\mathbf b_*-\mathbf b)\), \(\mathbf X'\mathbf e=\mathbf 0\) \(\Rightarrow\) \((\mathbf b_*-\mathbf b)'\mathbf X'\mathbf X(\mathbf b_*-\mathbf b)=(\mathbf r-\mathbf R\mathbf b)'\mathbf M^{-1}(\mathbf r-\mathbf R\mathbf b)\) |
| 15 | \(TSS\) común: \(RSS=TSS(1-R^2)\); \(F\) global: \(q=k-1\) y \(R^2_R=0\) |
| 16 | \(\mathbf b=\boldsymbol\beta+\mathbf F\mathbf u\); estandarizar con Cholesky; \(\hat\sigma^2\xrightarrow{p}\sigma^2\) + Slutsky |