温馨提示: 定期 清理浏览器缓存,可以获得最佳浏览体验。
作者: (西北大学)
E-Mail: philoyl@163.com
目录
当有足够有效的工具变量时,方程中的参数可以被识别,在这样的情况下,使用 2SLS 法将得到唯一的估计结果。在计量经济分析中,当方程中的参数被识别时,我们就说方程是被识别的。在 IV 估计式中:
仅有当以下两个条件都满足时,
若
的秩 小于 ,则称方程是 识别不足 的,此时就无法用计量方法得到一致的估计结果。 若 的秩 等于 ,则称方程是 恰足识别 的。 若 的秩 大于 ,则称方程是 过度识别 的。
过度识别约束检验 是对 工具变量的外生性 进行检验。在 恰足识别 情况下,我们无法对工具变量的外生性进行直接检验, 但是在过度识别情况下,我们就可以检验多余的工具变量是否与干扰项
上式中
Hausman (1978) 提出:用恰足识别方程的工具变量的子集进行 2SLS 的估计结果 与 用所有工具变量进行 2SLS 的估计结果 进行比较,如果所有的工具变量都是有效的,那么这两个估计结果之间的差异就应当仅仅是抽样误差。 与检验变量是否是内生的情况类似,构建原始的 Hausman 统计量在计算上是复杂的,不过,我们可以使用一个简单的基于回归的检验过程来替代上面的检验,具体步骤如下:
在 同方差 情形下: (1). 使用所有的工具变量
进行 2SLS 回归,得到残差 ; (2). 将 对 进行 OLS 回归(包含常数项),得到 (假设 与 包括常数项,否则为 uncentered ); (3). 在原假设 和 假设 (Assumption 2SLS.3) 下,有 ,其中 为多余约束(多余工具变量)的个数, 。 为 Sargan 统计量。 (4). 如果我们拒绝了原假设,那就意味着我们必须重新审查选择的工具变量;如果我们不能拒绝原假设,我们就能够对整体的工具变量的有效性有一定的信心。当然,这个检验对于探测个别工具变量内生性的功效是较低的。
异方差 情形下的计算要稍微复杂些。
在 异方差 情形下: (1). 通过 2SLS 的第一阶段计算得到
; (2). 选择 的任意子集 ,维度为 ( 无论是哪些子集被选取出来,只要我们选择 个元素即可 ); (3). 将子集 中的每一个元素对 与 做回归并计算残差 ,维度为 ,即 个元素; (4). 将 1 对 做回归 (不包括常数项) 并计算残差平方和 与 。 (5). 渐进服从 分布,判断是否拒绝原假设。与同方差情形一样,如果我们拒绝了原假设,就意味着工具变量不是外生的;如果不能拒绝原假设,就意味着整体上工具变量是外生的。
在 Stata 中,可以使用命令自动实现上述检验。当 2SLS 回归做完之后,用命令
estat overid
即可对工具变量的外生性进行检验,接下来我们使用案例 1 的数据举例说明。
我们要检验的是:父亲与母亲的受教育年数 (
. use "D:\stata15\ado\personal\IV_2SLS\Data\mroz.dta", clear
. *-过度识别约束检验(**同方差情形下**)(手动计算)
. *-overidentifying restriction
. *-2SLS
. ivregress 2sls lwage $aa (educ = motheduc fatheduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 24.65
Prob > chi2 = 0.0000
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0312895 1.96 0.050 .0000704 .1227228
exper | .0441704 .0133696 3.30 0.001 .0179665 .0703742
expersq | -.000899 .0003998 -2.25 0.025 -.0016826 -.0001154
_cons | .0481003 .398453 0.12 0.904 -.7328532 .8290538
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-1.计算残差(u的估计值uhat)
. cap drop uhat
. predict uhat, residual
(325 missing values generated)
. *-2.将残差与所有外生变量和工具变量做线性回归,得到R2的值
. reg uhat $aa motheduc fatheduc
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(4, 423) = 0.09
Model | .170502977 4 .042625744 Prob > F = 0.9845
Residual | 192.849519 423 .455909028 R-squared = 0.0009
-------------+---------------------------------- Adj R-squared = -0.0086
Total | 193.020022 427 .452037522 Root MSE = .67521
------------------------------------------------------------------------------
uhat | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
exper | -.0000183 .0133291 -0.00 0.999 -.0262179 .0261813
expersq | 7.34e-07 .0003985 0.00 0.999 -.0007825 .000784
motheduc | -.0066065 .0118864 -0.56 0.579 -.0299704 .0167573
fatheduc | .0057823 .0111786 0.52 0.605 -.0161902 .0277547
_cons | .0109641 .1412571 0.08 0.938 -.2666892 .2886173
------------------------------------------------------------------------------
. *-3.计算统计量NR2,即Sargan统计量
. gen sargan = e(N)*e(r2)
. *-或生成暂元在屏幕上显示
. scalar Sargan = e(N)*e(r2)
. dis "Sargan = " Sargan
Sargan = .37807101
. *-4.判断是否拒绝原假设H0:所有的外生变量与结构方程中的随机误差项u不相关
. *- NR2统计量服从χ2(q)分布,q为过度识别约束的个数,即多余工具变量的个数
. *- 在本例中,由于只有一个内生变量,但工具变量有motheduc与fatheduc两个,所以q=1
. *- 在5%的显著性水平上,χ2(1)=3.84,而NR2的值为 n_rsquare = 0.378071
. *- 因此,不能拒绝原假设,我们对整体上工具变量的外生性是有信心的。
. scalar pvalue = chiprob(1, Sargan) //与下一行命令等价
. * scalar pvalue = 1-chi2(1, Sargan)
. dis "p-value = " pvalue
p-value = .53863741
. *-过度识别约束检验(**同方差情形下**)(Stata自动计算)
. *-1.进行2SLS回归
. ivregress 2sls lwage $aa (educ = motheduc fatheduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 24.65
Prob > chi2 = 0.0000
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0312895 1.96 0.050 .0000704 .1227228
exper | .0441704 .0133696 3.30 0.001 .0179665 .0703742
expersq | -.000899 .0003998 -2.25 0.025 -.0016826 -.0001154
_cons | .0481003 .398453 0.12 0.904 -.7328532 .8290538
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.过度识别约束检验
. estat overid
Tests of overidentifying restrictions:
Sargan (score) chi2(1) = .378071 (p = 0.5386)
Basmann chi2(1) = .373985 (p = 0.5408)
(2)假设在 异方差 情形下,在第一步进行 2SLS 回归时增加 robust
选项,之后使用 estat overid
命令进行检验,Stata 命令和结果如下所示:
. *-过度识别约束检验(**异方差情形下**)(手动计算)
. *-计算educ_hat
. reg educ motheduc fatheduc huseduc $aa
Source | SS df MS Number of obs = 753
-------------+---------------------------------- F(5, 747) = 130.16
Model | 1820.49038 5 364.098077 Prob > F = 0.0000
Residual | 2089.54946 747 2.79725496 R-squared = 0.4656
-------------+---------------------------------- Adj R-squared = 0.4620
Total | 3910.03984 752 5.19952106 Root MSE = 1.6725
------------------------------------------------------------------------------
educ | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
motheduc | .130004 .0223789 5.81 0.000 .086071 .1739371
fatheduc | .1013613 .0214423 4.73 0.000 .059267 .1434556
huseduc | .3715645 .0220465 16.85 0.000 .3282839 .414845
exper | .0532406 .0218443 2.44 0.015 .0103571 .0961241
expersq | -.0007403 .000708 -1.05 0.296 -.0021303 .0006497
_cons | 5.115778 .298017 17.17 0.000 4.530727 5.700828
------------------------------------------------------------------------------
. predict educ_hat, xb
. *-计算残差 r1 与 r2
. reg motheduc $aa educ_hat
Source | SS df MS Number of obs = 753
-------------+---------------------------------- F(3, 749) = 187.97
Model | 3662.73295 3 1220.91098 Prob > F = 0.0000
Residual | 4864.82881 749 6.49509854 R-squared = 0.4295
-------------+---------------------------------- Adj R-squared = 0.4272
Total | 8527.56175 752 11.3398428 Root MSE = 2.5485
------------------------------------------------------------------------------
motheduc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
exper | -.1051582 .0337061 -3.12 0.002 -.1713279 -.0389885
expersq | .0015231 .0010851 1.40 0.161 -.000607 .0036532
educ_hat | 1.425138 .0608066 23.44 0.000 1.305767 1.54451
_cons | -7.412718 .7419038 -9.99 0.000 -8.869176 -5.956259
------------------------------------------------------------------------------
. predict r1, res
. reg fatheduc $aa educ_hat
Source | SS df MS Number of obs = 753
-------------+---------------------------------- F(3, 749) = 197.80
Model | 4242.00749 3 1414.0025 Prob > F = 0.0000
Residual | 5354.45466 749 7.14880462 R-squared = 0.4420
-------------+---------------------------------- Adj R-squared = 0.4398
Total | 9596.46215 752 12.7612529 Root MSE = 2.6737
------------------------------------------------------------------------------
fatheduc | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
exper | -.1068543 .0353617 -3.02 0.003 -.1762741 -.0374346
expersq | .0014908 .0011384 1.31 0.191 -.0007439 .0037256
educ_hat | 1.534126 .0637932 24.05 0.000 1.408891 1.65936
_cons | -9.170285 .7783437 -11.78 0.000 -10.69828 -7.64229
------------------------------------------------------------------------------
. predict r2, res
. *-计算2SLS残差uhat
. ivregress 2sls lwage $aa (educ = motheduc fatheduc huseduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 34.90
Prob > chi2 = 0.0000
R-squared = 0.1495
Root MSE = .66616
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0803918 .021672 3.71 0.000 .0379155 .1228681
exper | .0430973 .0132027 3.26 0.001 .0172204 .0689742
expersq | -.0008628 .0003943 -2.19 0.029 -.0016357 -.0000899
_cons | -.1868574 .2840591 -0.66 0.511 -.743603 .3698883
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc huseduc
. cap drop uhat
. predict uhat, res
(325 missing values generated)
. *-生成新变量uhat*r1与uhat*r2
. gen uhat_r1 = uhat * r1
(325 missing values generated)
. gen uhat_r2 = uhat * r2
(325 missing values generated)
. *-计算SSR
. gen one = 1
. reg one uhat_r1 uhat_r2, noconstant
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(2, 426) = 0.51
Model | 1.018745 2 .509372498 Prob > F = 0.6019
Residual | 426.981255 426 1.00230342 R-squared = 0.0024
-------------+---------------------------------- Adj R-squared = -0.0023
Total | 428 428 1 Root MSE = 1.0012
------------------------------------------------------------------------------
one | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
uhat_r1 | -.0270098 .028959 -0.93 0.352 -.0839302 .0299106
uhat_r2 | -.0004977 .0307894 -0.02 0.987 -.0610157 .0600203
------------------------------------------------------------------------------
. predict e, res
(325 missing values generated)
. gen e2 = e*e
(325 missing values generated)
. sum e2
Variable | Obs Mean Std. Dev. Min Max
-------------+---------------------------------------------------------
e2 | 428 .9976198 .0942201 .3649098 1.558913
. scalar SSR = r(N)*r(mean)
. dis "SSR = " SSR
SSR = 426.98126
. *-计算N-SSR与p-value
. *-结果为不能拒绝原假设H0,即工具变量是外生的
. scalar N_SSR = r(N)- SSR
. scalar pvalue = chiprob(2, N_SSR)
. dis "N_SSR = " N_SSR
N_SSR = 1.018745
. dis "p-value = " pvalue
p-value = .60087251
. *-过度识别约束检验(**异方差情形下**)(Stata自动计算)
. *-1.进行2SLS回归,增加异方差选项robust
. ivregress 2sls lwage $aa (educ = motheduc fatheduc), robust
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 18.61
Prob > chi2 = 0.0003
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
| Robust
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0331824 1.85 0.064 -.0036397 .126433
exper | .0441704 .0154736 2.85 0.004 .0138428 .074498
expersq | -.000899 .0004281 -2.10 0.036 -.001738 -.00006
_cons | .0481003 .4277846 0.11 0.910 -.7903421 .8865427
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.过度识别约束检验
. estat overid
Test of overidentifying restrictions:
Score chi2(1) = .443461 (p = 0.5055)
在同方差或异方差的情形下,过度识别约束的检验结果表明我们无法拒绝原假设,表明整体上所有工具变量(父母的受教育年数)是外生的。
让我们从线性模型、里面存在单一的可能是内生变量的情形开始。为了清楚标记,我们定义
上式中
重要的是要记住上式的假设在整节内容中都成立。我们还要假设当
Hausman(1978)提出比较 OLS 和 2SLS 的估计量
为了进行基于回归的检验,我们写出包含误差项形式的
上式中
上式中
上式的关键是在模型设定上
由上式得到的 OLS估计量
由上式得到的 OLS 标准误不是有效的(除非
在 Stata 中,可以使用命令自动实现上述检验。当 2SLS 回归做完之后,使用
estat endog
命令即可检验内生变量是否是内生的,接下来我们举例说明。
我们要检验的是
(1)假设在 同方差 情形下,根据上述步骤,Stata 命令和结果如下所示:
. ***************单个内生变量*************************
. *-Hausman检验(**同方差情形下**)(手动计算)
. *-1.进行2SLS回归
. ivregress 2sls lwage $aa (educ = motheduc fatheduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 24.65
Prob > chi2 = 0.0000
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0312895 1.96 0.050 .0000704 .1227228
exper | .0441704 .0133696 3.30 0.001 .0179665 .0703742
expersq | -.000899 .0003998 -2.25 0.025 -.0016826 -.0001154
_cons | .0481003 .398453 0.12 0.904 -.7328532 .8290538
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.获取参与回归的样本,给sample_2sls赋值为1
. gen sample_2sls = e(sample)
. *-3.对约减方程做回归:用内生变量作为因变量,所有外生变量和工具变量作为自变量
. reg educ $aa motheduc fatheduc if sample_2sls == 1
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(4, 423) = 28.36
Model | 471.620998 4 117.90525 Prob > F = 0.0000
Residual | 1758.57526 423 4.15738833 R-squared = 0.2115
-------------+---------------------------------- Adj R-squared = 0.2040
Total | 2230.19626 427 5.22294206 Root MSE = 2.039
------------------------------------------------------------------------------
educ | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
exper | .0452254 .0402507 1.12 0.262 -.0338909 .1243417
expersq | -.0010091 .0012033 -0.84 0.402 -.0033744 .0013562
motheduc | .157597 .0358941 4.39 0.000 .087044 .2281501
fatheduc | .1895484 .0337565 5.62 0.000 .1231971 .2558997
_cons | 9.10264 .4265614 21.34 0.000 8.264196 9.941084
------------------------------------------------------------------------------
. *-4.计算上述约减方程的残差
. predict vhat_reducedeq, res
. *-5.将vhat_reducedeq加入到结构方程中进行回归
. *- 原假设H0:beta_vhat_reducedeq = 0(educ是外生变量)
. *- 若beta_vhat_reducedeq显著异于0,则拒绝原假设,表明educ是内生变量
. reg lwage $aa educ vhat_reducedeq if sample_2sls == 1
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(4, 423) = 20.50
Model | 36.2573159 4 9.06432898 Prob > F = 0.0000
Residual | 187.070135 423 .442246183 R-squared = 0.1624
-------------+---------------------------------- Adj R-squared = 0.1544
Total | 223.327451 427 .523015108 Root MSE = .66502
--------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------------+----------------------------------------------------------------
exper | .0441704 .0132394 3.34 0.001 .0181471 .0701937
expersq | -.000899 .0003959 -2.27 0.024 -.0016772 -.0001208
educ | .0613966 .0309849 1.98 0.048 .000493 .1223003
vhat_reducedeq | .0581666 .0348073 1.67 0.095 -.0102501 .1265834
_cons | .0481003 .3945753 0.12 0.903 -.7274721 .8236727
--------------------------------------------------------------------------------
. *-Hausman检验(**同方差情形下**)(Stata自动计算)
. *-1.进行2SLS回归
. ivregress 2sls lwage $aa (educ = motheduc fatheduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 24.65
Prob > chi2 = 0.0000
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0312895 1.96 0.050 .0000704 .1227228
exper | .0441704 .0133696 3.30 0.001 .0179665 .0703742
expersq | -.000899 .0003998 -2.25 0.025 -.0016826 -.0001154
_cons | .0481003 .398453 0.12 0.904 -.7328532 .8290538
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.Hausman检验
. estat endog
Tests of endogeneity
Ho: variables are exogenous
Durbin (score) chi2(1) = 2.80707 (p = 0.0938)
Wu-Hausman F(1,423) = 2.79259 (p = 0.0954)
(2)假设在 异方差 情形下,根据上述步骤,Stata 命令和结果如下所示:
. *-Hausman检验(**异方差情形下**)(手动计算)
. *-1.进行2SLS回归
. ivregress 2sls lwage $aa (educ = motheduc fatheduc)
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 24.65
Prob > chi2 = 0.0000
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0312895 1.96 0.050 .0000704 .1227228
exper | .0441704 .0133696 3.30 0.001 .0179665 .0703742
expersq | -.000899 .0003998 -2.25 0.025 -.0016826 -.0001154
_cons | .0481003 .398453 0.12 0.904 -.7328532 .8290538
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.获取参与回归的样本,给sample_2sls赋值为1
. cap drop sample_2sls
. gen sample_2sls = e(sample)
. *-3.对约减方程做回归:用内生变量作为因变量,所有外生变量和工具变量作为自变量
. reg educ $aa motheduc fatheduc if sample_2sls == 1
Source | SS df MS Number of obs = 428
-------------+---------------------------------- F(4, 423) = 28.36
Model | 471.620998 4 117.90525 Prob > F = 0.0000
Residual | 1758.57526 423 4.15738833 R-squared = 0.2115
-------------+---------------------------------- Adj R-squared = 0.2040
Total | 2230.19626 427 5.22294206 Root MSE = 2.039
------------------------------------------------------------------------------
educ | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
exper | .0452254 .0402507 1.12 0.262 -.0338909 .1243417
expersq | -.0010091 .0012033 -0.84 0.402 -.0033744 .0013562
motheduc | .157597 .0358941 4.39 0.000 .087044 .2281501
fatheduc | .1895484 .0337565 5.62 0.000 .1231971 .2558997
_cons | 9.10264 .4265614 21.34 0.000 8.264196 9.941084
------------------------------------------------------------------------------
. *-4.计算上述约减方程的残差
. cap drop vhat_reducedeq
. predict vhat_reducedeq, res
. *-5.将vhat_reducedeq加入到结构方程中进行回归
. *- 原假设H0:beta_vhat_reducedeq = 0(educ是外生变量)
. *- 使用稳健型标准误计算t统计量的值
. *- 若beta_vhat_reducedeq显著异于0,则拒绝原假设,表明educ是内生变量
. reg lwage $aa educ vhat_reducedeq if sample_2sls == 1, robust
Linear regression Number of obs = 428
F(4, 423) = 21.52
Prob > F = 0.0000
R-squared = 0.1624
Root MSE = .66502
--------------------------------------------------------------------------------
| Robust
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---------------+----------------------------------------------------------------
exper | .0441704 .0151219 2.92 0.004 .0144469 .0738939
expersq | -.000899 .0004152 -2.16 0.031 -.0017152 -.0000828
educ | .0613966 .0326667 1.88 0.061 -.0028127 .125606
vhat_reducedeq | .0581666 .0364135 1.60 0.111 -.0134073 .1297406
_cons | .0481003 .4221019 0.11 0.909 -.7815781 .8777787
--------------------------------------------------------------------------------
. *-Hausman检验(**异方差情形下**)(Stata自动计算)
. *-1.进行2SLS回归,增加robust选项
. ivregress 2sls lwage $aa (educ = motheduc fatheduc), robust
Instrumental variables (2SLS) regression Number of obs = 428
Wald chi2(3) = 18.61
Prob > chi2 = 0.0003
R-squared = 0.1357
Root MSE = .67155
------------------------------------------------------------------------------
| Robust
lwage | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0613966 .0331824 1.85 0.064 -.0036397 .126433
exper | .0441704 .0154736 2.85 0.004 .0138428 .074498
expersq | -.000899 .0004281 -2.10 0.036 -.001738 -.00006
_cons | .0481003 .4277846 0.11 0.910 -.7903421 .8865427
------------------------------------------------------------------------------
Instrumented: educ
Instruments: exper expersq motheduc fatheduc
. *-2.Hausman检验
. estat endog
Tests of endogeneity
Ho: variables are exogenous
Robust score chi2(1) = 2.52857 (p = 0.1118)
Robust regression F(1,423) = 2.55166 (p = 0.1109)
在同方差假设情形下,内生性的检验结果表明在 10% 的显著性水平上可以拒绝原假设,表明在 10% 的显著性水平上,
下面将基于回归的 Hausman 检验拓展至多个内生变量的情形。定义
上式中,
并做一个标准
我们还可以使用
使用案例 2 中的 card.dta
数据。在工资方程中我们增加交乘项
上式中
. ***************多个内生变量*************************
. use "D:\stata15\ado\personal\IV_2SLS\Data\card.dta", clear
. *-手动计算
. *-Coviariates set up
. global cc "exper expersq south smsa reg661 reg662 reg663 reg664 reg665 reg666 reg667 reg668 smsa66"
. *-OLS
. reg lwage educ i.black##c.educ $cc
note: educ omitted because of collinearity
Source | SS df MS Number of obs = 3,010
-------------+---------------------------------- F(16, 2993) = 80.83
Model | 178.817017 16 11.1760636 Prob > F = 0.0000
Residual | 413.824594 2,993 .138264148 R-squared = 0.3017
-------------+---------------------------------- Adj R-squared = 0.2980
Total | 592.641611 3,009 .196956335 Root MSE = .37184
------------------------------------------------------------------------------
lwage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
educ | .0707788 .0037548 18.85 0.000 .0634165 .0781411
1.black | -.4191076 .0794021 -5.28 0.000 -.5747958 -.2634194
educ | 0 (omitted)
|
black#c.educ |
1 | .0178595 .006271 2.85 0.004 .0055636 .0301554
|
exper | .0821556 .0066828 12.29 0.000 .0690522 .0952589
expersq | -.0021349 .0003207 -6.66 0.000 -.0027638 -.001506
south | -.1441927 .0259827 -5.55 0.000 -.1951384 -.093247
smsa | .1340695 .0200931 6.67 0.000 .0946718 .1734671
reg661 | -.1221745 .0388047 -3.15 0.002 -.1982611 -.046088
reg662 | -.0232881 .0282266 -0.83 0.409 -.0786336 .0320574
reg663 | .0230953 .0273506 0.84 0.399 -.0305325 .0767231
reg664 | -.0666851 .0356556 -1.87 0.062 -.1365971 .0032269
reg665 | .0032644 .03614 0.09 0.928 -.0675974 .0741261
reg666 | .0151249 .0401224 0.38 0.706 -.0635454 .0937952
reg667 | -.0074966 .0394073 -0.19 0.849 -.0847648 .0697716
reg668 | -.1757195 .0462851 -3.80 0.000 -.2664733 -.0849657
smsa66 | .0249824 .0194297 1.29 0.199 -.0131144 .0630793
_cons | 4.80677 .0752604 63.87 0.000 4.659202 4.954337
------------------------------------------------------------------------------
OLS 的结果表示黑人的教育回报率比非黑人的高1.79%。
为了检验