class: center, middle, inverse, title-slide .title[ # 广义矩估计GMM(Generalized Method of Moments) ] .author[ ### 文旷宇 ] .institute[ ### 华中科技大学 ] --- class: left, middle layout: true
--- ### 主要内容 - 矩条件 - 2SLS - 有效GMM - GMM框架下的假设检验 --- ###矩条件 - 工具变量法要寻找一个工具变量 `\(Z_i\)`与 `\(X_i\)`高度相关而与 `\(e_i\)`无关,则有 `\(E[Z_ie_i]=0 \Rightarrow E[Z_i(Y_i-X_i'\beta)]=0\)` - 对于GMM,有 `\(E[g(w_i,\beta)]=0\)`,这里 `\(g:R^p\times R^k\rightarrow R^l\)`( `\(p\)` 个数据, `\(k\)` 个参数, `\(l\)` 个矩条件) - `\(E[g(w_i,\beta)]=0,\forall \beta'\not=\beta,E[g(w_i,\beta')]\not=0\)`,我们就说模型是可识别的;但如果多个参数都能使这个成立,那么矩条件就不能被识别。 - `\(l=k\)`时为恰好识别, `\(\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\hat{\beta}_{MM})=0\)` - `\(l>k\)`时为过度识别, `\(\hat{\beta}_{GMM}=\arg\min\limits_{\beta}\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]\)` --- ###广义矩估计 - 证明估计量的一致性 - 由大数定律可知, `\(\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]\rightarrow^p_{n\rightarrow \infty} \Big[E[g(w_i,\beta)]\Big]'W\Big[E[g(w_i,\beta)]\Big]\)` - 根据定义, `\(\hat{\beta}_{GMM}\)`最小化了 `\(\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]\)`,因此如果我们想要证明 `\(\hat{\beta}_{GMM}\to\beta\)`,只需要证明 `\(\beta\)`最小化了 `\(\Big[E[g(w_i,\beta)]\Big]'W\Big[E[g(w_i,\beta)]\Big]\)`。 --- ###广义矩估计(续) - 一阶条件为 `\(\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\beta)}{\partial \beta}\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)\Big]=0\)`, - 即 `\(\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\hat{\beta}_{GMM})\Big]=0\)` - 泰勒展开,在 `\(\beta\)` 附近对 `\(\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\hat{\beta}_{GMM})\)`进行泰勒展开, `$$\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\hat{\beta}_{GMM})=\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)+(\frac{1}{n}\sum^n_{i=1}\frac{\partial g(\omega_i,\beta^{\ast})}{\partial\beta})(\hat{\beta}_{GMM}-\beta)$$` - 此时一阶条件变为 `$$\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n\Big[\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)+(\frac{1}{n}\sum^n_{i=1}\frac{\partial g(\omega_i,\beta^{\ast})}{\partial\beta})(\hat{\beta}_{GMM}-\beta)\Big]=0$$` --- ###广义矩估计(续) `$$\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n(\frac{1}{n}\sum^n_{i=1}\frac{\partial g(\omega_i,\beta^{\ast})}{\partial\beta})(\hat{\beta}_{GMM}-\beta)\\=-\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n\frac{1}{n}\sum\limits_{i=1}^ng(w_i,\beta)$$` 因此, `\(\sqrt{n}(\hat{\beta}_{GMM}-\beta)\)`可由下式表示: `$$\small-\Bigg[\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n(\frac{1}{n}\sum^n_{i=1}\frac{\partial g(\omega_i,\beta^{\ast})}{\partial\beta})\Bigg]^{-1}\Big[\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\Big]'W_n\frac{1}{\sqrt{n}}\sum\limits_{i=1}^n g(w_i,\beta)$$` 令 `\(Q=E[\frac{\partial g(\omega_i,\beta)}{\partial \beta}]\)`, `\(\Sigma=E[g(\omega_i,\beta)g(\omega_i,\beta)']\)` --- ###广义矩估计(续) `\(\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\hat{\beta}_{GMM})}{\partial \beta}\to_pQ\)`, `\(W_n\to_pW\)` `\(\frac{1}{n}\sum\limits_{i=1}^n \frac{\partial g(w_i,\beta^{\ast})}{\partial \beta}\to_pQ\)`, `\(\frac{1}{\sqrt{n}}\sum^n_{i=1}g(\omega_i,\beta)\to_dN(0,\Sigma)\)` 因此, `\(\sqrt{n}(\hat{\beta}_{GMM}-\beta)\to_d -\big[Q'WQ\big]^{-1}Q'WN(0,\Sigma)\)` `$$\sqrt{n}(\hat{\beta}_{GMM}-\beta)\to_d N(0,\big[Q'WQ\big]^{-1}Q'W\Sigma WQ\big[Q'WQ\big]^{-1}$$` --- ###2SLS - 矩条件为 `\(g(\omega_i,\beta)=Z_i(Y_i-X_i'\beta)\)`,则 `\(\frac{\partial g(\omega_i,\beta)}{\partial \beta}=-Z_iX_i'\)` - `\(\hat{\beta}_{GMM}=arg min\Big[\frac{1}{n} \sum\limits^n_{i=1}Z_i(Y_i-X_i'\beta)\Big]'W_n\Big[\frac{1}{n} \sum\limits^n_{i=1}Z_i(Y_i-X_i'\beta)\Big]\)` 一阶条件为 `\(\big[-\frac{1}{n}\sum\limits^n_{i=1}Z_iX_i'\big]'W_n\Big[\frac{1}{n} \sum\limits^n_{i=1}Z_i(Y_i-X_i'\beta)\Big]=0\)` 可由此推出 `\(\hat{\beta}_{GMMIV}\)`的表达式: `$$\small \begin{aligned}\hat{\beta}_{GMMIV}&=\Bigg[(\frac{1}{n}\sum\limits^n_{i=1}X_iZ_i')W_n(\frac{1}{n}\sum\limits^n_{i=1}Z_iX_i')\Bigg]^{-1}(\frac{1}{n}\sum\limits^n_{i=1}X_iZ_i')W_n(\frac{1}{n}\sum\limits^n_{i=1}Z_iY_i)\\&=\Big[X'ZW_nZ'X\Big]^{-1}(X'Z)W_n(Z'Y)\end{aligned}$$` 当 `\(W_n=(Z'Z)^{-1}\)`时, `\(\hat{\beta}_{GMMIV}=\hat{\beta}_{2SLS}\)` --- ###有效GMM 有效GMM的两步法: - `\(\hat{\Sigma}=\frac{1}{n}\sum\limits_{i=1}^n g(w_i,\hat{\beta})g(w_i,\hat{\beta})'\)`,其中 `\(\hat{\beta}\)`是 `\(\beta\)`的一致估计量。特别地, `\(\hat{\beta}=\arg \min \Big[\frac{1}{n}\sum\limits_{i=1}^n g(w_i,\beta)\Big]'\Big[\frac{1}{n}\sum\limits_{i=1}^n g(w_i,\beta)\Big]\)`, - 令 `\(W_n=\hat{\Sigma}^{-1}\)`, `\(\hat{\beta}_{EGMM}=\arg \min \Big[\frac{1}{n}\sum\limits_{i=1}^n g(w_i,\beta)\Big]'\hat{\Sigma}^{-1}\Big[\frac{1}{n}\sum\limits_{i=1}^n g(w_i,\beta)\Big]\)` - `\(\sqrt{n}(\hat{\beta}_{EGMM}-\beta)\to_d N(0,[Q'\Sigma^{-1}Q]^{-1})\)` - 由 `\(g(\omega_i,\beta)=Z_i(Y_i-X_i'\beta)=Z_ie_i\)` 可推出 `\(\Sigma=E\big[g(\omega_i,\beta)g(\omega_i,\beta)'\big]=E\big[Z_ie_i^2Z_i'\big]=E\big[e_i^2Z_iZ_i'\big]\)` --- ###有效GMM(续) - 假定 `\(E\big[e_i^2|Z_i\big]=\sigma^2\)` - `\(\big[E[e_i^2Z_iZ_i']\big]^{-1}=E\Big[E[e_i^2Z_iZ_i'|Z_i]\Big]^{-1}=E[\sigma^2Z_iZ_i']^{-1}=\sigma^2E[Z_iZ_i']^{-1}\)` - 两阶段最小二乘法是GMM的一个特例, `\(W_n=\Big[\frac{1}{n}\sum\limits^n_{i=1}Z_iZ_i'\Big]^{-1}\)`,且 `\(W_n\to_P W=\big[E[Z_iZ_i']\big]^{-1}\)`。 - 有效GMM的权重矩阵为 `\(W_n\)`,且有 `\(W_n\to_P W=\big[E[e_i^2Z_iZ_i']\big]^{-1}\)`,特别地,同方差假定下( `\(E[e_i^2|Z_i]=\sigma^2\)`)的2SLS就是最有效的GMM。 --- ###假设检验 - `\(H_0 :h(\beta)=0\)`; `\(H_1 :h(\beta)\not=0\)`,其中 `\(h(\cdot):R^k\to R^q\)` 在 `\(\beta\)`的某个开区间内连续可导。 - `\(\sqrt{n}(h(\hat{\beta}_{GMM})-h(\beta))\to_dN(0,\frac{\partial h(\beta)}{\partial \beta}V(\frac{\partial h(\beta)}{\partial \beta})')\)` - `\(h(\hat{\beta}_{GMM})\approx N(0,\frac{1}{n}\frac{\partial h(\beta)}{\partial \beta}V\frac{\partial h(\beta)}{\partial \beta'})\)` - `\(h(\hat{\beta}_{GMM})\Big[\frac{1}{n}\frac{\partial h(\beta)}{\partial \beta}V\frac{\partial h(\beta)}{\partial \beta'}\Big]^{-1}h(\hat{\beta}_{GMM})\to _d\chi^2_q\)` - 用 `\(\hat{V}\)`来估计 `\(V\)`,则有 `\(h(\hat{\beta}_{GMM})\Big[\frac{1}{n}\frac{\partial h(\beta)}{\partial \beta}\hat{V}\frac{\partial h(\beta)}{\partial \beta'}\Big]^{-1}h(\hat{\beta}_{GMM})\to _d\chi^2_q\)` - 因此,Wald统计量 `\(nh(\hat{\beta}_{GMM})\Big[\frac{\partial h(\beta)}{\partial \beta}\hat{V}\frac{\partial h(\beta)}{\partial \beta'}\Big]^{-1}h(\hat{\beta}_{GMM})\to _d\chi^2_q\)`