楼主: 听见海涛声
18323 15

[回归分析求助] 急!ivreg2 回归结果中只报告了 Hansen J statistic 的结果,无法显示其他检验结果。 [推广有奖]

  • 3关注
  • 5粉丝

博士生

32%

还不是VIP/贵宾

-

威望
0
论坛币
42402 个
通用积分
13.8216
学术水平
10 点
热心指数
0 点
信用等级
0 点
经验
2636 点
帖子
110
精华
0
在线时间
368 小时
注册时间
2013-12-23
最后登录
2024-3-18

30论坛币
如题。
看到论坛很多学友使用ivreg2时,都会报告Weak identification test (Cragg-Donald Wald F statistic)等结果。

我使用ivreg2 回归结果中只报告了 Hansen J statistic 的结果。读了ivreg2的帮助文件,里面说 “The Hansen-Sargan test is a test of overidentifying restrictions.  The joint null hypothesis is that the excluded instruments are valid instruments, i.e., uncorrelated with the error term, and that they are correctly excluded from the estimated equation.  Under the null, the test statistic is distributed as chi-squared in the number of overidentifying restrictions.  A rejection casts doubt on the validity of the instruments. ” 最后一句话的意思是:拒绝 Hansen J 的结果意味着弱工具变量?
但是,我看到论坛里很多有关ivreg2的分析贴都说 Hansen J 不是用来检验IV有效性的。

请问问如何知道回归中的工具变量是否有效?如何在我使用ivreg2时也显示其他的检测结果呢?  感谢各位大神指点!


代码如下:
ivreg2 roe (fds= l.fds lfn ) $z yr*, first r

回归结果如下:

First-stage regressions
-----------------------
Warning: collinearities detected among instruments
1st stage tests of excluded exogenous variables may be incorrect

First-stage regression of fds:

      Source |       SS           df       MS      Number of obs   =       798
-------------+----------------------------------   F(16, 781)      =   1077.40
       Model |  2771.17492        16  173.198433   Prob > F        =    0.0000
    Residual |   125.55047       781  .160756044   R-squared       =    0.9567
-------------+----------------------------------   Adj R-squared   =    0.9558
       Total |  2896.72539       797  3.63453625   Root MSE        =    .40094

------------------------------------------------------------------------------
         fds |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         ipr |  -.7784742    .123837    -6.29   0.000    -1.021567   -.5353815
        cash |  -.0937093   .1848735    -0.51   0.612    -.4566171    .2691985
        inta |   .0729728   .3384978     0.22   0.829    -.5915005    .7374461
         inv |   -.219052   .2984387    -0.73   0.463    -.8048889    .3667849
         lev |    .088286   .0721323     1.22   0.221    -.0533102    .2298822
        size |   .0150404   .0175326     0.86   0.391    -.0193762     .049457
         age |  -.0413863   .0294579    -1.40   0.160    -.0992123    .0164398
   ownership |  -.0153685   .0380713    -0.40   0.687    -.0901028    .0593658
         yr1 |          0  (omitted)
         yr2 |   .4988312   .0766778     6.51   0.000     .3483123    .6493502
         yr4 |  -.3122429   .0684479    -4.56   0.000    -.4466066   -.1778791
         yr5 |  -.0320953   .0657231    -0.49   0.625    -.1611101    .0969195
         yr6 |  -.1230321   .0644031    -1.91   0.056    -.2494557    .0033916
         yr7 |   .6540823   .0651506    10.04   0.000     .5261913    .7819734
         yr8 |    .401018   .0698746     5.74   0.000     .2638537    .5381824
             |
         fds |
         L1. |   .9612215   .0097947    98.14   0.000     .9419944    .9804485
             |
         lfn |   .1294921   .0210508     6.15   0.000     .0881692    .1708151
       _cons |  -.3833881   .3569935    -1.07   0.283    -1.084169    .3173924
------------------------------------------------------------------------------
Partial R-squared of excluded instruments:   0.9423
Test of excluded instruments:
  F(  2,   781) =  6377.56
  Prob > F      =   0.0000

Summary results for first-stage regressions:

                Shea
Variable      Partial R2      Partial R2       F(  2,   781)    P-value
fds             0.9423          0.9423           6377.56         0.0000





IV (2SLS) regression with robust standard errors
------------------------------------------------

                                                      Number of obs =      798
                                                      F( 15,   781) =     9.56
                                                      Prob > F      =   0.0000
Total (centered) SS     =  6.939967727                Centered R2   =   0.2355
Total (uncentered) SS   =  13.64917262                Uncentered R2 =   0.6113
Residual SS             =  5.305642002                Root MSE      =     .082

------------------------------------------------------------------------------
             |               Robust
         roe |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         fds |   .0050063   .0015065     3.32   0.001     .0020537    .0079589
         ipr |   .0697356    .024771     2.82   0.005     .0211854    .1182858
        cash |   .3218028   .0404903     7.95   0.000     .2424433    .4011624
        inta |  -.3404941   .1222533    -2.79   0.005    -.5801062   -.1008821
         inv |  -.0265555    .067374    -0.39   0.693    -.1586062    .1054952
         lev |  -.0383824   .0291256    -1.32   0.188    -.0954676    .0187028
        size |   .0298174   .0049024     6.08   0.000     .0202089    .0394258
         age |  -.0037206    .006417    -0.58   0.562    -.0162977    .0088565
   ownership |  -.0165756   .0084315    -1.97   0.049     -.033101   -.0000501
         yr1 |          0  (omitted)
         yr2 |  -.0088435   .0231836    -0.38   0.703    -.0542825    .0365954
         yr4 |  -.0067761   .0169465    -0.40   0.689    -.0399906    .0264384
         yr5 |  -.0289826   .0163743    -1.77   0.077    -.0610756    .0031105
         yr6 |  -.0302858   .0151743    -2.00   0.046    -.0600268   -.0005448
         yr7 |  -.0355642   .0153144    -2.32   0.020    -.0655798   -.0055486
         yr8 |  -.0583836   .0167517    -3.49   0.000    -.0912162   -.0255509
       _cons |  -.5007741   .0970583    -5.16   0.000    -.6910049   -.3105432
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         1.618
                                                   Chi-sq(1) P-val =   0.20344
------------------------------------------------------------------------------
Collinearities detected among instruments: 1 instrument(s) dropped
Instrumented:  fds
Instruments:   ipr cash inta inv lev size age ownership yr1 yr2 yr4 yr5 yr6 yr7
               yr8 L.fds lfn
------------------------------------------------------------------------------

.
end of do-file

.

最佳答案

黃河泉 查看完整内容

请更新你的 ivreg2

回帖推荐

蓝色 发表于13楼  查看完整内容

mac 的结果

本帖被以下文库推荐

起床困难户,大熊胖一郎。
沙发
黃河泉 在职认证  发表于 2018-5-1 14:20:28 |只看作者 |坛友微信交流群
听见海涛声 发表于 2018-5-1 16:45
十分感谢您的帮助,鞠躬!

我copy您的代码到Stata 15, 出现错误如下:
请更新你的 ivreg2
  1. ssc install ivreg2, replace
复制代码

使用道具

藤椅
黃河泉 在职认证  发表于 2018-5-1 16:16:58 |只看作者 |坛友微信交流群
奇怪了,我试了都没问题 (你也试一下)。
  1. use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear
  2. ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), small first
复制代码

使用道具

板凳
黃河泉 在职认证  发表于 2018-5-1 16:17:47 |只看作者 |坛友微信交流群
  1. First-stage regressions
  2. -----------------------


  3. First-stage regression of iq:

  4. Statistics consistent for homoskedasticity only
  5. Number of obs =                    758
  6. ------------------------------------------------------------------------------
  7.           iq |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
  8. -------------+----------------------------------------------------------------
  9.          med |   .2877745   .1622338     1.77   0.077    -.0307176    .6062665
  10.          kww |   .4581116   .0699323     6.55   0.000     .3208229    .5954003
  11.          age |  -.8809144   .2232535    -3.95   0.000    -1.319198   -.4426307
  12.          mrt |   -.584791    .946056    -0.62   0.537    -2.442056    1.272474
  13.            s |   2.497742   .2858159     8.74   0.000     1.936638    3.058846
  14.         expr |   -.033548   .2534458    -0.13   0.895    -.5311042    .4640082
  15.       tenure |   .6158215   .2731146     2.25   0.024     .0796522    1.151991
  16.          rns |  -2.610221   .9499731    -2.75   0.006    -4.475177   -.7452663
  17.         smsa |   .0260481   .9222585     0.03   0.977    -1.784499    1.836595
  18.              |
  19.         year |
  20.          67  |   .9254935   1.655969     0.56   0.576    -2.325449    4.176436
  21.          68  |   .4706951   1.574561     0.30   0.765    -2.620429     3.56182
  22.          69  |   2.164635   1.521387     1.42   0.155    -.8221007     5.15137
  23.          70  |   5.734786   1.696033     3.38   0.001     2.405191    9.064381
  24.          71  |   5.180639   1.562156     3.32   0.001     2.113866    8.247411
  25.          73  |   4.526686    1.48294     3.05   0.002     1.615429    7.437943
  26.              |
  27.        _cons |   67.20449   4.107281    16.36   0.000     59.14121    75.26776
  28. ------------------------------------------------------------------------------
  29. F test of excluded instruments:
  30.   F(  4,   742) =    13.79
  31.   Prob > F      =   0.0000
  32. Sanderson-Windmeijer multivariate F test of excluded instruments:
  33.   F(  4,   742) =    13.79
  34.   Prob > F      =   0.0000



  35. Summary results for first-stage regressions
  36. -------------------------------------------

  37.                                            (Underid)            (Weak id)
  38. Variable     | F(  4,   742)  P-val | SW Chi-sq(  4) P-val | SW F(  4,   742)
  39. iq           |      13.79    0.0000 |       56.33   0.0000 |       13.79

  40. Stock-Yogo weak ID F test critical values for single endogenous regressor:
  41.                                     5% maximal IV relative bias    16.85
  42.                                    10% maximal IV relative bias    10.27
  43.                                    20% maximal IV relative bias     6.71
  44.                                    30% maximal IV relative bias     5.34
  45.                                    10% maximal IV size             24.58
  46.                                    15% maximal IV size             13.96
  47.                                    20% maximal IV size             10.26
  48.                                    25% maximal IV size              8.31
  49. Source: Stock-Yogo (2005).  Reproduced by permission.
  50. NB: Critical values are for Sanderson-Windmeijer F statistic.

  51. Underidentification test
  52. Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
  53. Ha: matrix has rank=K1 (identified)
  54. Anderson canon. corr. LM statistic       Chi-sq(4)=52.44    P-val=0.0000

  55. Weak identification test
  56. Ho: equation is weakly identified
  57. Cragg-Donald Wald F statistic                                      13.79

  58. Stock-Yogo weak ID test critical values for K1=1 and L1=4:
  59.                                     5% maximal IV relative bias    16.85
  60.                                    10% maximal IV relative bias    10.27
  61.                                    20% maximal IV relative bias     6.71
  62.                                    30% maximal IV relative bias     5.34
  63.                                    10% maximal IV size             24.58
  64.                                    15% maximal IV size             13.96
  65.                                    20% maximal IV size             10.26
  66.                                    25% maximal IV size              8.31
  67. Source: Stock-Yogo (2005).  Reproduced by permission.

  68. Weak-instrument-robust inference
  69. Tests of joint significance of endogenous regressors B1 in main equation
  70. Ho: B1=0 and orthogonality conditions are valid
  71. Anderson-Rubin Wald test           F(4,742)=      24.23     P-val=0.0000
  72. Anderson-Rubin Wald test           Chi-sq(4)=     98.99     P-val=0.0000
  73. Stock-Wright LM S statistic        Chi-sq(4)=     87.56     P-val=0.0000

  74. Number of observations               N  =        758
  75. Number of regressors                 K  =         13
  76. Number of endogenous regressors      K1 =          1
  77. Number of instruments                L  =         16
  78. Number of excluded instruments       L1 =          4

  79. IV (2SLS) estimation
  80. --------------------

  81. Estimates efficient for homoskedasticity only
  82. Statistics consistent for homoskedasticity only

  83.                                                       Number of obs =      758
  84.                                                       F( 12,   745) =    45.91
  85.                                                       Prob > F      =   0.0000
  86. Total (centered) SS     =  139.2861498                Centered R2   =   0.4255
  87. Total (uncentered) SS   =  24652.24662                Uncentered R2 =   0.9968
  88. Residual SS             =   80.0182337                Root MSE      =    .3277

  89. ------------------------------------------------------------------------------
  90.           lw |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
  91. -------------+----------------------------------------------------------------
  92.           iq |   .0001747   .0039374     0.04   0.965    -.0075551    .0079044
  93.            s |   .0691759    .013049     5.30   0.000     .0435587    .0947931
  94.         expr |    .029866    .006697     4.46   0.000     .0167189    .0430132
  95.       tenure |   .0432738   .0076934     5.62   0.000     .0281705     .058377
  96.          rns |  -.1035897   .0297371    -3.48   0.001    -.1619682   -.0452111
  97.         smsa |   .1351148   .0268889     5.02   0.000     .0823277    .1879019
  98.              |
  99.         year |
  100.          67  |   -.052598   .0481067    -1.09   0.275    -.1470388    .0418428
  101.          68  |   .0794686   .0451078     1.76   0.079     -.009085    .1680222
  102.          69  |   .2108962   .0443153     4.76   0.000     .1238984    .2978939
  103.          70  |   .2386338   .0514161     4.64   0.000     .1376962    .3395714
  104.          71  |   .2284609   .0441236     5.18   0.000     .1418396    .3150823
  105.          73  |   .3258944   .0410718     7.93   0.000     .2452642    .4065247
  106.              |
  107.        _cons |    4.39955   .2708771    16.24   0.000     3.867777    4.931323
  108. ------------------------------------------------------------------------------
  109. Underidentification test (Anderson canon. corr. LM statistic):          52.436
  110.                                                    Chi-sq(4) P-val =    0.0000
  111. ------------------------------------------------------------------------------
  112. Weak identification test (Cragg-Donald Wald F statistic):               13.786
  113. Stock-Yogo weak ID test critical values:  5% maximal IV relative bias    16.85
  114.                                          10% maximal IV relative bias    10.27
  115.                                          20% maximal IV relative bias     6.71
  116.                                          30% maximal IV relative bias     5.34
  117.                                          10% maximal IV size             24.58
  118.                                          15% maximal IV size             13.96
  119.                                          20% maximal IV size             10.26
  120.                                          25% maximal IV size              8.31
  121. Source: Stock-Yogo (2005).  Reproduced by permission.
  122. ------------------------------------------------------------------------------
  123. Sargan statistic (overidentification test of all instruments):          87.655
  124.                                                    Chi-sq(3) P-val =    0.0000
  125. ------------------------------------------------------------------------------
  126. Instrumented:         iq
  127. Included instruments: s expr tenure rns smsa 67.year 68.year 69.year 70.year
  128.                       71.year 73.year
  129. Excluded instruments: med kww age mrt
  130. ------------------------------------------------------------------------------
复制代码

使用道具

黃河泉 发表于 2018-5-1 16:17
十分感谢您的帮助,鞠躬!

我copy您的代码到Stata 15, 出现错误如下:


. clear

. use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear
(Wages of Very Young Men, Zvi Griliches, J.Pol.Ec. 1976)

. ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), small first

factor-variable operators not allowed
r(101);

使用道具

黃河泉 发表于 2018-5-1 17:47
请更新你的 ivreg2
十分感谢您再次帮助:)

我已将stata15 SE 的 ivreg2 更到最新. 同时也使用stata13 进行ivreg2 回归,结果仍然只报告Hansen J。

敬礼!

使用道具

7
黃河泉 在职认证  发表于 2018-5-1 18:04:15 |只看作者 |坛友微信交流群
听见海涛声 发表于 2018-5-1 17:59
十分感谢您再次帮助:)

我已将stata15 SE 的 ivreg2 更到最新. 同时也使用stata13 进行ivreg2 回归,结 ...
见鬼了!你是用 Stata 15 跑的回归吗?

使用道具

8
听见海涛声 发表于 2018-5-1 20:50:09 |只看作者 |坛友微信交流群
黃河泉 发表于 2018-5-1 18:04
见鬼了!你是用 Stata 15 跑的回归吗?
是的,我用的是Stata SE 15.1.

有劳您为我指出问题所在。

使用道具

9
蓝色 发表于 2018-5-1 22:21:09 来自手机 |只看作者 |坛友微信交流群
stata15跑黄老师的是没有问题的

使用道具

蓝色 发表于 2018-5-1 22:21
stata15跑黄老师的是没有问题的
谢谢您的帮助~hats off!

经您的提醒,我又copy黄老师的代码到Stata SE 15.1 (for Mac), 仍然出现如下情况:

. use http://fmwww.bc.edu/ec-p/data/hayashi/griliches76.dta, clear
(Wages of Very Young Men, Zvi Griliches, J.Pol.Ec. 1976)

. ivreg2 lw s expr tenure rns smsa i.year (iq=med kww age mrt), small f
> irst
factor-variable operators not allowed
r(101);

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-30 20:12