全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
852 2
2022-06-01
求教诸位,以下两个命令竟然结果不一样(结果相似),实在百思不得其解,哪位老师知道是为什么?在实证研究中应该使用哪种命令?

//数据:
use https://www3.nd.edu/~rwilliam/statafiles/wages, clear
//命令1:
xtabond2 wks exp ed if south==1,gmm(wks,lag(2 .)collapse) iv(ed exp) twostep robust
//命令2:
keep if south==1
xtabond2 wks exp ed ,gmm(wks,lag(2 .)collapse) iv(ed exp) twostep robust


//结果1:
. use https://www3.nd.edu/~rwilliam/statafiles/wages, clear

. xtabond2 wks exp ed if south==1,gmm(wks,lag(2 .)collapse) iv(ed exp) twostep
> robust
Favoring speed over space. To switch, type or click on mata: mata set matafavor
>  space, perm.

Dynamic panel-data estimation, two-step system GMM
------------------------------------------------------------------------------
Group variable: id                              Number of obs      =      1209
Time variable : t                               Number of groups   =       182
Number of instruments = 9                       Obs per group: min =         1
Wald chi2(2)  =  34717.51                                      avg =      6.64
Prob > chi2   =     0.000                                      max =         7
------------------------------------------------------------------------------
             |              Corrected
         wks | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         exp |  -.0477394   .0265605    -1.80   0.072     -.099797    .0043183
          ed |  -.0313986   .1024907    -0.31   0.759    -.2322768    .1694795
       _cons |   48.58417   1.542108    31.51   0.000     45.56169    51.60665
------------------------------------------------------------------------------
Instruments for first differences equation
  Standard
    D.(ed exp)
  GMM-type (missing=0, separate instruments for each period unless collapsed)
    L(2/6).wks collapsed
Instruments for levels equation
  Standard
    ed exp
    _cons
  GMM-type (missing=0, separate instruments for each period unless collapsed)
    DL.wks collapsed
------------------------------------------------------------------------------
Arellano-Bond test for AR(1) in first differences: z =  -3.50  Pr > z =  0.000
Arellano-Bond test for AR(2) in first differences: z =  -1.61  Pr > z =  0.108
------------------------------------------------------------------------------
Sargan test of overid. restrictions: chi2(6)    =  64.92  Prob > chi2 =  0.000
  (Not robust, but not weakened by many instruments.)
Hansen test of overid. restrictions: chi2(6)    =  15.96  Prob > chi2 =  0.014
  (Robust, but weakened by many instruments.)

Difference-in-Hansen tests of exogeneity of instrument subsets:
  GMM instruments for levels
    Hansen test excluding group:     chi2(5)    =  14.85  Prob > chi2 =  0.011
    Difference (null H = exogenous): chi2(1)    =   1.11  Prob > chi2 =  0.293
  gmm(wks, collapse lag(2 .))
    Hansen test excluding group:     chi2(0)    =   0.00  Prob > chi2 =      .
    Difference (null H = exogenous): chi2(6)    =  15.96  Prob > chi2 =  0.014
  iv(ed exp)
    Hansen test excluding group:     chi2(4)    =   2.49  Prob > chi2 =  0.647
    Difference (null H = exogenous): chi2(2)    =  13.47  Prob > chi2 =  0.001

//结果2:
. use https://www3.nd.edu/~rwilliam/statafiles/wages, clear

.
. keep if south==1
(2,956 observations deleted)


. xtabond2 wks exp ed ,gmm(wks,lag(2 .)collapse) iv(ed exp) twostep robust
Favoring speed over space. To switch, type or click on mata: mata set matafavor
>  space, perm.

Dynamic panel-data estimation, two-step system GMM
------------------------------------------------------------------------------
Group variable: id                              Number of obs      =      1209
Time variable : t                               Number of groups   =       182
Number of instruments = 9                       Obs per group: min =         1
Wald chi2(2)  =  34718.00                                      avg =      6.64
Prob > chi2   =     0.000                                      max =         7
------------------------------------------------------------------------------
             |              Corrected
         wks | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
         exp |  -.0469161   .0267252    -1.76   0.079    -.0992966    .0054644
          ed |  -.0306545   .1024905    -0.30   0.765    -.2315321    .1702232
       _cons |    48.5599   1.543044    31.47   0.000     45.53559    51.58421
------------------------------------------------------------------------------
Instruments for first differences equation
  Standard
    D.(ed exp)
  GMM-type (missing=0, separate instruments for each period unless collapsed)
    L(2/6).wks collapsed
Instruments for levels equation
  Standard
    ed exp
    _cons
  GMM-type (missing=0, separate instruments for each period unless collapsed)
    DL.wks collapsed
------------------------------------------------------------------------------
Arellano-Bond test for AR(1) in first differences: z =  -3.47  Pr > z =  0.001
Arellano-Bond test for AR(2) in first differences: z =  -1.62  Pr > z =  0.105
------------------------------------------------------------------------------
Sargan test of overid. restrictions: chi2(6)    =  66.07  Prob > chi2 =  0.000
  (Not robust, but not weakened by many instruments.)
Hansen test of overid. restrictions: chi2(6)    =  15.87  Prob > chi2 =  0.014
  (Robust, but weakened by many instruments.)

Difference-in-Hansen tests of exogeneity of instrument subsets:
  GMM instruments for levels
    Hansen test excluding group:     chi2(5)    =  14.68  Prob > chi2 =  0.012
    Difference (null H = exogenous): chi2(1)    =   1.20  Prob > chi2 =  0.274
  gmm(wks, collapse lag(2 .))
    Hansen test excluding group:     chi2(0)    =   0.00  Prob > chi2 =      .
    Difference (null H = exogenous): chi2(6)    =  15.87  Prob > chi2 =  0.014
  iv(ed exp)
    Hansen test excluding group:     chi2(4)    =   2.41  Prob > chi2 =  0.661
    Difference (null H = exogenous): chi2(2)    =  13.46  Prob > chi2 =  0.001
在小样本中结果差别不大,但在大样本中这种差别就没办法忽视了,尤其是解释变量是类似基尼系数这种介于0-1之间的话
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2022-6-2 08:26:55
这可能是您发现的bug。
按理命令1和命令2的估计结果应该相等。
命令1和命令2的结果不相等时,采用命令2的估计结果。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2024-8-16 06:46:03
加油 加油 加油
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群