🍎 連享會主頁:lianxh.cn
New! lianxh 命令發布了: GIF 動圖介紹
隨時搜索 Stata 推文、教程、手冊、論壇,安裝命令如下:
. ssc install lianxh
連享會 · 最受歡迎的課
🍓 2021 Stata 寒假班
⌚ 2021 年 1.25-2.4
🌲 主講:連玉君 (中山大學);江艇 (中國人民大學)
👉 課程主頁:https://gitee.com/arlionn/PX
作者: 謝雁翔 (南開大學)
郵箱: xyxmask1995@163.com
編者按: 本文主要參考「Sebastian Kripfganz」 的如下內容,特此致謝!
Source: Kripfganz S . XTDPDGMM: Stata module to perform generalized method of moments estimation of linear dynamic panel data models[J]. Statistical Software Components, 2019. -Link-
Kripfganz S . Generalized method of moments estimation of linear dynamic panel-data models[C]. London Stata Conference 2019. Stata Users Group, 2019. -Link-
目錄
1. 簡介
2. 估計方法
2.1 差分 GMM
2.2 水平 GMM
2.3 系統 GMM
3. xtdpdgmm 命令介紹
3.1 xtdpdgmm 命令語法
3.2 xtdpdgmm 命令實操
3.3 各估計方式呈現
4. 參考文獻
5. 相關推文
溫馨提示: 文中連結在微信中無法生效。請點擊底部「閱讀原文」。
1. 簡介
對於動態面板數據模型 (Dynamic Panel Data, DPD),直接用最小二乘法估計是有偏的,為解決這一問題,Arellano 和 Bond (1991)、 Arellano 和 Bover (1995)、以及 Blundell 和 Bond (1998) 等提出了「一階差分 GMM (FD-GMM)」和「系統 GMM (SYS-GMM)」估計法。
相應地,Stata 也提供了 xtabond、xtdpdsys、以及 xtabond2 等早期估計 GMM 的命令。Kripfganz (2019) 在此基礎上,編寫了 xtdpdgmm 命令,該命令解決了 xtabond2 等命令的一些缺陷,並使估計更加靈活。特別的,該命令整合了 Ahn 和 Schmidt (1995) 非線性矩條件、更好解決了高度自相關問題、以及提供了 Hansen 等 (1996) 的迭代 GMM 估計。
本文的主要目的是介紹動態面板數據模型的兩種估計方法,以及 xtdpdgmm 命令的應用。
2. 估計方法2.1 差分 GMM
考慮以下動態面板模型:
通過一階差分消去個體效應
然而,由於
為此,Anderson 和 Hsiao (1981) 認為由於
Arellano 和 Bond (1991) 使用所有可能的滯後變量作為工具變量 (工具變量個數可能多於內生變量) 進行估計,這一方法又被稱為「差分 GMM」。值得注意的是,在使用差分 GMM 時,擾動項
差分 GMM 注意事項:
如果
如果
不隨時間變化的變量
如果序列
2.2 水平 GMM為克服上述差分 GMM 將不隨時間變化的變量
2.3 系統 GMMBlundell 和 Bond (1998) 將差分 GMM 與水平 GMM 聯合進行 GMM 估計,即「系統 GMM」。與差分 GMM 相比,系統 GMM 的優點是,可以提高估計的效率,並且可以估計不隨時間變化的變量
Note:本部分內容摘自「陳強. 高級計量經濟學及 Stata 應用[M]. 高等教育出版社, 2014. -Link-」,詳見 289-291 頁,特此感謝!
3. xtdpdgmm 命令介紹3.1 xtdpdgmm 命令語法
xtdpdgmm 命令的安裝:
ssc install xtdpdgmm, replacextdpdgmm 命令的語法:
xtdpdgmm depvar [indepvars] [if] [in] [, options]其中,option 具體選項如下:
iv(iv_spec):指定標準式工具變量,並可指定任意多次;gmmiv(gmmiv_spec):指定 GMM 式工具變量,並可指定任意多次;nl (nl_spec):添加由誤差協方差結構得出的非線性矩條件;collapse:摺疊式工具變量為標準式工具變量;model(model_spec):設置工具變量的默認形式及標準誤;wmatrix(wmat_spec):指定用於獲得一階 GMM 估計或兩步 GMM 估計的初始估計的加權矩陣;onestep|twostep:確定一步估計或兩步估計;vce(vce_spec):設置聚類標準誤的估計方式進行穩健標準誤估計;level(#):設置置信區間,默認為水平為 95%;display_options:控制列和列的格式,行間距,行寬,需要省略的變量以及基礎空白單元格、因子變量的標記;from(init_spec):確定係數的初始值;nodots:在迭代 GMM 估計中的每個步驟中顯示迭代日誌,而不是點;igmm_options:控制迭代的 GMM 過程;minimize_options:控制最小化過程。3.2 xtdpdgmm 命令實操以 abdata.dta 數據集為例,該數據集是 140 個國家 1976 年到 1984 年的各種宏觀指標的面板數據。id 代表每個國家的標號,year 代表年份,其他變量包括就業率 emp、平均工資 wage、投資佔 GDP 的百分比 cap 等。
*數據下載地址:https://gitee.com/arlionn/data/blob/master/data01/abdata.dta
*use abdata.dta, clear
webuse abdata //調用網絡數據
describe //數據結構
sum //描述性統計
xtset id year //聲明面板數據一階差分 GMM 估計:
xtdpdgmm L(0/1).n w k, model(diff) gmm(n, lag(2 .)) gmm(w, lag(1 .)) gmm(k, lag(. .)) noconsnote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = .01960406
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 126 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 126 max = 8
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4144164 .0341502 12.14 0.000 .3474833 .4813495
|
w | -.8292293 .0588914 -14.08 0.000 -.9446543 -.7138042
k | .3929936 .0223829 17.56 0.000 .3491239 .4368634
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
1978:L2.n 1979:L2.n 1980:L2.n 1981:L2.n 1982:L2.n 1983:L2.n 1984:L2.n
1979:L3.n 1980:L3.n 1981:L3.n 1982:L3.n 1983:L3.n 1984:L3.n 1980:L4.n
1981:L4.n 1982:L4.n 1983:L4.n 1984:L4.n 1981:L5.n 1982:L5.n 1983:L5.n
1984:L5.n 1982:L6.n 1983:L6.n 1984:L6.n 1983:L7.n 1984:L7.n 1984:L8.n
2, model(diff):
1978:L1.w 1979:L1.w 1980:L1.w 1981:L1.w 1982:L1.w 1983:L1.w 1984:L1.w
1978:L2.w 1979:L2.w 1980:L2.w 1981:L2.w 1982:L2.w 1983:L2.w 1984:L2.w
1979:L3.w 1980:L3.w 1981:L3.w 1982:L3.w 1983:L3.w 1984:L3.w 1980:L4.w
1981:L4.w 1982:L4.w 1983:L4.w 1984:L4.w 1981:L5.w 1982:L5.w 1983:L5.w
1984:L5.w 1982:L6.w 1983:L6.w 1984:L6.w 1983:L7.w 1984:L7.w 1984:L8.w
3, model(diff):
1978:F6.k 1978:F5.k 1979:F5.k 1978:F4.k 1979:F4.k 1980:F4.k 1978:F3.k
1979:F3.k 1980:F3.k 1981:F3.k 1978:F2.k 1979:F2.k 1980:F2.k 1981:F2.k
1982:F2.k 1978:F1.k 1979:F1.k 1980:F1.k 1981:F1.k 1982:F1.k 1983:F1.k
1978:k 1979:k 1980:k 1981:k 1982:k 1983:k 1984:k 1978:L1.k 1979:L1.k
1980:L1.k 1981:L1.k 1982:L1.k 1983:L1.k 1984:L1.k 1978:L2.k 1979:L2.k
1980:L2.k 1981:L2.k 1982:L2.k 1983:L2.k 1984:L2.k 1979:L3.k 1980:L3.k
1981:L3.k 1982:L3.k 1983:L3.k 1984:L3.k 1980:L4.k 1981:L4.k 1982:L4.k
1983:L4.k 1984:L4.k 1981:L5.k 1982:L5.k 1983:L5.k 1984:L5.k 1982:L6.k
1983:L6.k 1984:L6.k 1983:L7.k 1984:L7.k 1984:L8.k差分 GMM 兩步估計:
xtdpdgmm L(0/1).n w k, model(diff) gmm(n, lag(2 .)) gmm(w, lag(1 .)) gmm(k, lag(. .)) nocons two vce(r) nofootnoteGeneralized method of moments estimation
Fitting full model:
Step 1 f(b) = .01960406
Step 2 f(b) = .90967907
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 126 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 126 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4126102 .0740255 5.57 0.000 .2675228 .5576976
|
w | -.8271943 .0944749 -8.76 0.000 -1.012362 -.6420268
k | .3931545 .0484993 8.11 0.000 .2980975 .4882114
---*序列相關檢驗
estat serialArellano-Bond test for autocorrelation of the first-differenced residuals
H0: no autocorrelation of order 1: z = -3.8127 Prob > |z| = 0.0001
H0: no autocorrelation of order 2: z = -0.8686 Prob > |z| = 0.3851*過度識別檢驗
estat overidSargan-Hansen test of the overidentifying restrictions
H0: overidentifying restrictions are valid
2-step moment functions, 2-step weighting matrix chi2(123) = 127.3551
Prob > chi2 = 0.3757
2-step moment functions, 3-step weighting matrix chi2(123) = 127.6358
Prob > chi2 = 0.3691差分 GMM 與系統 GMM 對比:
*差分 GMM
xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w, lag(1 3)) gmm(k, lag(0 2)) nocons two vce(r)
estat serial, ar(1/3)
estat overid
*系統 GMM
xtdpdgmm L(0/1).n w k, model(diff) collapse gmm(n, lag(2 4)) gmm(w k, lag(1 3)) gmm(n, lag(1 1) diff model(level)) gmm(w k, lag(0 0) diff model(level)) two vce(r)
estat serial, ar(1/3)
estat overidGeneralized method of moments estimation
Fitting full model:
Step 1 f(b) = .0006272
Step 2 f(b) = .08562737
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 9 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 9 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .3564619 .1074848 3.32 0.001 .1457956 .5671281
|
w | -1.432958 .2141048 -6.69 0.000 -1.852595 -1.01332
k | .2860594 .0541221 5.29 0.000 .1799821 .3921367
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L2.n L3.n L4.n
2, model(diff):
L1.w L2.w L3.w
3, model(diff):
k L1.k L2.k
Arellano-Bond test for autocorrelation of the first-differenced residuals
H0: no autocorrelation of order 1: z = -2.6865 Prob > |z| = 0.0072
H0: no autocorrelation of order 2: z = -0.9414 Prob > |z| = 0.3465
H0: no autocorrelation of order 3: z = -0.3256 Prob > |z| = 0.7447
Sargan-Hansen test of the overidentifying restrictions
H0: overidentifying restrictions are valid
2-step moment functions, 2-step weighting matrix chi2(6) = 11.9878
Prob > chi2 = 0.0622
2-step moment functions, 3-step weighting matrix chi2(6) = 12.8283
Prob > chi2 = 0.0458Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = .00285146
Step 2 f(b) = .11568719
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 13 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 13 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .5117523 .1208484 4.23 0.000 .2748937 .7486109
|
w | -1.323125 .2383451 -5.55 0.000 -1.790273 -.855977
k | .1931365 .0941343 2.05 0.040 .0086367 .3776363
_cons | 4.698425 .7943584 5.91 0.000 3.141511 6.255339
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L2.n L3.n L4.n
2, model(diff):
L1.w L2.w L3.w L1.k L2.k L3.k
3, model(level):
L1.D.n
4, model(level):
D.w D.k
5, model(level):
_cons
Arellano-Bond test for autocorrelation of the first-differenced residuals
H0: no autocorrelation of order 1: z = -3.3341 Prob > |z| = 0.0009
H0: no autocorrelation of order 2: z = -1.2436 Prob > |z| = 0.2136
H0: no autocorrelation of order 3: z = -0.1939 Prob > |z| = 0.8462
Sargan-Hansen test of the overidentifying restrictions
H0: overidentifying restrictions are valid
2-step moment functions, 2-step weighting matrix chi2(9) = 16.1962
Prob > chi2 = 0.0629
2-step moment functions, 3-step weighting matrix chi2(9) = 13.8077
Prob > chi2 = 0.1293
3.3 各估計方式呈現具有嚴格外生變量的 Anderson-Hsiao IV 估計:
xtdpdgmm L(0/1).n w k, iv(L2.n w k, d) m(d) nocons
xtdpdgmm L(0/1).n w k, iv(L2.n) iv(w k, d) m(d) noconsnote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = 1.000e-32
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 3 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 3 max = 8
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .1512874 .1313926 1.15 0.250 -.1062374 .4088122
|
w | -.5149142 .0512699 -10.04 0.000 -.6154013 -.4144271
k | .4141651 .0468689 8.84 0.000 .3223038 .5060264
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
D.L2.n D.w D.knote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = 3.096e-32
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 3 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 3 max = 8
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | 1.093635 .1414757 7.73 0.000 .816348 1.370922
|
w | -.5565656 .0762891 -7.30 0.000 -.7060895 -.4070417
k | .1353903 .0560407 2.42 0.016 .0255525 .2452282
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L2.n
2, model(diff):
D.w D.k具有嚴格外生變量和工具變量約束的 Arellano-Bond 一步 GMM 估計:
xtdpdgmm L(0/1).n w k, gmm(L.n, l(1 4) c) iv(w k, d) m(d) noconsnote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = .00130087
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 6 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 6 max = 8
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .8602906 .0979689 8.78 0.000 .6682752 1.052306
|
w | -.5922287 .065327 -9.07 0.000 -.7202672 -.4641902
k | .2072601 .0434627 4.77 0.000 .1220748 .2924454
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L1.L.n L2.L.n L3.L.n L4.L.n
2, model(diff):
D.w D.k具有前定變量和工具變量約束的 Arellano-Bover 兩步 GMM 估計:
xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(0 3) c) m(fod) two vce(r)Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = .00317868
Step 2 f(b) = .11805918
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 13 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 13 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4582898 .1314203 3.49 0.000 .2007107 .7158688
|
w | -1.607401 .3437998 -4.68 0.000 -2.281237 -.9335663
k | .0878702 .1647289 0.53 0.594 -.2349925 .4107329
_cons | 5.644924 1.001522 5.64 0.000 3.681976 7.607871
---
Instruments corresponding to the linear moment conditions:
1, model(fodev):
L.n L1.L.n L2.L.n L3.L.n w L1.w L2.w L3.w k L1.k L2.k L3.k
2, model(level):
_cons具有前定變量和工具變量約束的 Ahn-Schmidt 兩步 GMM 估計:
xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(1 4) c) m(d) nl(noser) two vce(r)
xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(1 4) c) m(d) nl(iid) two vce(r)Generalized method of moments estimation
Fitting full model:
Step 1:
initial: f(b) = 6.9689895
alternative: f(b) = 1.9358147
rescale: f(b) = .09404104
Iteration 0: f(b) = .09404104
Iteration 1: f(b) = .00092528
Iteration 2: f(b) = .00073988
Iteration 3: f(b) = .00073977
Iteration 4: f(b) = .00073977
Step 2:
Iteration 0: f(b) = .1213722
Iteration 1: f(b) = .10323966
Iteration 2: f(b) = .10315659
Iteration 3: f(b) = .103154
Iteration 4: f(b) = .1031539
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 13 Obs per group: min = 6
nonlinear = 6 avg = 6.364286
total = 19 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4304133 .1198004 3.59 0.000 .1956088 .6652178
|
w | -1.41989 .2825341 -5.03 0.000 -1.973647 -.8661332
k | .1917874 .1248583 1.54 0.125 -.0529303 .4365051
_cons | 5.112359 .8521958 6.00 0.000 3.442086 6.782632
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L1.L.n L2.L.n L3.L.n L4.L.n L1.w L2.w L3.w L4.w L1.k L2.k L3.k L4.k
2, model(level):
_consGeneralized method of moments estimation
Fitting full model:
Step 1:
initial: f(b) = 7.1763841
alternative: f(b) = 2.0088687
rescale: f(b) = .10682203
Iteration 0: f(b) = .10682203
Iteration 1: f(b) = .00313745
Iteration 2: f(b) = .00214453
Iteration 3: f(b) = .00213797
Iteration 4: f(b) = .00213795
Step 2:
Iteration 0: f(b) = .22634011
Iteration 1: f(b) = .18572491
Iteration 2: f(b) = .18339137
Iteration 3: f(b) = .18323575
Iteration 4: f(b) = .18322289
Iteration 5: f(b) = .18322171
Iteration 6: f(b) = .1832216
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 19 Obs per group: min = 6
nonlinear = 7 avg = 6.364286
total = 26 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .3162345 .1040268 3.04 0.002 .1123458 .5201233
|
w | -1.225117 .2050917 -5.97 0.000 -1.62709 -.8231451
k | .3370022 .1265224 2.66 0.008 .0890228 .5849816
_cons | 4.729435 .6060333 7.80 0.000 3.541632 5.917239
---
Instruments corresponding to the linear moment conditions:
1, model(iid):
1978:L.n 1979:L.n 1980:L.n 1981:L.n 1982:L.n 1983:L.n
2, model(diff):
L1.L.n L2.L.n L3.L.n L4.L.n L1.w L2.w L3.w L4.w L1.k L2.k L3.k L4.k
3, model(level):
_cons具有前定變量和工具變量約束的 Blundell-Bond 兩步 GMM 估計:
xtdpdgmm L(0/1).n w k, gmm(L.n w k, l(1 4) c m(d)) iv(L.n w k, d) two vce(r)Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = .00329575
Step 2 f(b) = .16391388
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 16 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 16 max = 8
(Std. Err. adjusted for 140 clusters in id)
---
| WC-Robust
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4695086 .1167909 4.02 0.000 .2406028 .6984145
|
w | -1.287266 .2672931 -4.82 0.000 -1.811151 -.7633817
k | .2172426 .0913599 2.38 0.017 .0381805 .3963046
_cons | 4.633068 .8721846 5.31 0.000 2.923618 6.342518
---
Instruments corresponding to the linear moment conditions:
1, model(diff):
L1.L.n L2.L.n L3.L.n L4.L.n L1.w L2.w L3.w L4.w L1.k L2.k L3.k L4.k
2, model(level):
D.L.n D.w D.k
3, model(level):
_cons具有前定變量的 Hayakawa-Qi-Breitung IV 估計量:
xtdpdgmm L(0/1).n w k, iv(L.n w k, bod) m(fod) noconsnote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = 1.737e-33
Group variable: id Number of obs = 891
Time variable: year Number of groups = 140
Moment conditions: linear = 3 Obs per group: min = 6
nonlinear = 0 avg = 6.364286
total = 3 max = 8
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
n |
L1. | .4698431 .1508717 3.11 0.002 .1741401 .7655461
|
w | -.682973 .3756931 -1.82 0.069 -1.419318 .0533719
k | -.1261108 .339384 -0.37 0.710 -.7912913 .5390696
---
Instruments corresponding to the linear moment conditions:
1, model(fodev):
B.L.n B.w B.k
方法: 固定效應模型、FM 估計、動態面板、穩健性檢驗、衡量偏誤問題
直接聽課 | 課件展示:https://gitee.com/arlionn/paper101
複製靜態 (加權) 固定效應估計:
xtdpdgmm n w k, iv(w k) m(md)
by id: egen weight = count(e(sample))
replace weight = sqrt(weight/(weight-1))
xtreg n w k [aw=weight], fenote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = 2.557e-25
Group variable: id Number of obs = 1031
Time variable: year Number of groups = 140
Moment conditions: linear = 3 Obs per group: min = 7
nonlinear = 0 avg = 7.364286
total = 3 max = 9
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
w | -.3666355 .0522024 -7.02 0.000 -.4689504 -.2643207
k | .6407201 .0200955 31.88 0.000 .6013336 .6801065
_cons | 2.491261 .1627504 15.31 0.000 2.172276 2.810246
---
Instruments corresponding to the linear moment conditions:
1, model(mdev):
w k
2, model(level):
_cons
(1,031 real changes made)
Fixed-effects (within) regression Number of obs = 1,031
Group variable: id Number of groups = 140
R-sq: Obs per group:
within = 0.5707 min = 7
between = 0.8466 avg = 7.4
overall = 0.8341 max = 9
F(2,889) = 590.79
corr(u_i, Xb) = 0.4345 Prob > F = 0.0000
---
n | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---+----
w | -.3666355 .0522948 -7.01 0.000 -.4692711 -.2639999
k | .6407201 .0201368 31.82 0.000 .6011988 .6802413
_cons | 2.492481 .163067 15.29 0.000 2.17244 2.812523
---+----
sigma_u | .58858668
sigma_e | .13719403
rho | .94846853 (fraction of variance due to u_i)
---
F test that all u_i=0: F(139, 889) = 110.65 Prob > F = 0.0000複製靜態 (未加權) 固定效應估計:
xtdpdgmm n w k, iv(w k) m(md) nores
xtreg n w k, fenote: standard errors may not be valid
Generalized method of moments estimation
Fitting full model:
Step 1 f(b) = 4.270e-25
Group variable: id Number of obs = 1031
Time variable: year Number of groups = 140
Moment conditions: linear = 3 Obs per group: min = 7
nonlinear = 0 avg = 7.364286
total = 3 max = 9
---
n | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---+----
w | -.367774 .0522015 -7.05 0.000 -.470087 -.2654611
k | .6403675 .020095 31.87 0.000 .6009819 .679753
_cons | 2.494684 .1627475 15.33 0.000 2.175704 2.813663
---
Instruments corresponding to the linear moment conditions:
1, model(mdev):
w k
2, model(level):
_consFixed-effects (within) regression Number of obs = 1,031
Group variable: id Number of groups = 140
R-sq: Obs per group:
within = 0.5704 min = 7
between = 0.8466 avg = 7.4
overall = 0.8341 max = 9
F(2,889) = 590.13
corr(u_i, Xb) = 0.4352 Prob > F = 0.0000
---
n | Coef. Std. Err. t P>|t| [95% Conf. Interval]
---+----
w | -.367774 .0523227 -7.03 0.000 -.4704645 -.2650835
k | .6403675 .0201417 31.79 0.000 .6008366 .6798984
_cons | 2.494684 .1631256 15.29 0.000 2.174527 2.81484
---+----
sigma_u | .58883268
sigma_e | .1372825
rho | .94844636 (fraction of variance due to u_i)
---
F test that all u_i=0: F(139, 889) = 110.72 Prob > F = 0.00004. 參考文獻
溫馨提示: 文中連結在微信中無法生效。請點擊底部「閱讀原文」。
Ahn, S. C., and P. Schmidt. 1995. Efficient estimation of models for dynamic panel data. Journal of Econometrics 68: 5-27. -Link-Anderson, T. W., and C. Hsiao. 1981. Estimation of dynamic models with error components. Journal of the American Statistical Association 76: 598-606. -Link-Arellano, M., and S. R. Bond. 1991. Some tests of specification for panel data: Monte Carlo evidence and an application to employment equations. Review of Economic Studies 58: 277-297. -Link-Arellano, M., and O. Bover. 1995. Another look at the instrumental variable estimation of error-components models. Journal of Econometrics 68: 29-51. -Link-Blundell, R., and S. R. Bond. 1998. Initial conditions and moment restrictions in dynamic panel data models. Journal of Econometrics 87: 115-143. -Link-Hansen, L. P., J. Heaton, and A. Yaron. 1996. Finite-sample properties of some alternative GMM estimators. Journal of Business & Economic Statistics 14: 262-280. -Link-Hayakawa, K., M. Qi, and J. Breitung. 2019. Double filter instrumental variable estimation of panel data models with weakly exogenous variables. Econometric Reviews 38: 1055-1088. -Link-Kiviet, J. F. 2020. Microeconometric dynamic panel data methods: Model specification and selection issues. Econometrics and Statistics 13: 16-45. -Link-Kripfganz, S., and C. Schwarz. 2019. Estimation of linear dynamic panel data models with time-invariant regressors. Journal of Applied Econometrics 34: 526-546. -Link-Roodman, D. 2009. A note on the theme of too many instruments. Oxford Bulletin of Economics and Statistics 71: 135-158. -Link-Windmeijer, F. 2005. A finite sample correction for the variance of linear efficient two-step GMM estimators. Journal of Econometrics 126: 25-51. -Link-5. 相關推文
Note: 產生如下推文列表的命令為:
lianxh 動態面板 過度識別 GMM IV, m
安裝最新版 lianxh 命令:
ssc install lianxh, replace溫馨提示: 文中連結在微信中無法生效。請點擊底部「閱讀原文」。
Sargan+Hansen:過度識別檢驗及Stata實現IV-工具變量法:第一階段係數符號確定時的小樣本無偏估計IV 經典:尋找 IV 的足跡——Card(1993)Abadie新作:簡明IV,DID,RDD教程和綜述
連享會 · 最受歡迎的課
🍓 2021 Stata 寒假班
⌚ 2021 年 1.25-2.4🌲 主講:連玉君 (中山大學);江艇 (中國人民大學)
👉 課程主頁:https://gitee.com/arlionn/PX
關於我們
🍎 連享會 ( 主頁:lianxh.cn ) 由中山大學連玉君老師團隊創辦,定期分享實證分析經驗。👉 直達連享會:【百度一下:連享會】即可直達連享會主頁。亦可進一步添加 主頁,知乎,面板數據,研究設計 等關鍵詞細化搜索。
New! lianxh 命令發布了: GIF 動圖介紹
隨時搜索連享會推文、Stata 資源,安裝命令如下:
. ssc install lianxh
使用詳情參見幫助文件 (有驚喜):
. help lianxh