本站分享:大数据、数据分析师考试认证培训,包括:Python培训Excel培训Matlab培训SPSS培训SAS培训R语言培训Hadoop培训Amos培训Stata培训Eviews培训广告位

Tips 102:xtabond2 搞定动态面板

stata培训 cdadata 455℃

Tips 102:xtabond2 搞定动态面板

【问题】

有木有为了动态面板伤过神?

刚看到xtabond2的更新,新加入e(Ze)

Z’E where E=2nd-step residuals, used in computing Hansen statistic

【方法】

Stata有个命令xtabond2,作者是:David Roodman,

http://www.cgdev.org/content/expert/detail/2719/

这哥还写过abar\newey2\ivvif\collapse2等。

xtabond2的详细说明:

How to Do xtabond2:
An Introduction to “Difference” and “System” GMM in Stata

http://www.cgdev.org/files/11619_file_HowtoDoxtabond8_with_foreword.pdf

还有专门介绍的PPT:

repec.org/nasug2006/How2Do_xtabond2.ppt

【例子】

*直接复制help中的例子

use http://www.stata-press.com/data/r7/abdata.dta

xtabond2 n l.n l(0/1).(w k) yr1980-yr1984, gmm(l.n w k) iv(yr1980-yr1984, passthru) noleveleq small

xtabond2 n l.n l(0/1).(w k) yr1980-yr1984, gmm(l.n w k) iv(yr1980-yr1984, mz) robust twostep small h(2)

xtabond2 n l(1/2).n l(0/1).w l(0/2).(k ys) yr1980-yr1984, gmm(l.n w k) iv(yr1980-yr1984) robust twostep

small

* Next two are equivalent, assuming id is the panel identifier

ivreg2 n cap (w = k ys rec) [pw=_n], cluster(ind) orthog(rec)

xtabond2 n w cap [pw=_n], iv(cap k ys, eq(level)) iv(rec, eq(level)) cluster(ind) h(1)

* Same for next two

regress n w k

xtabond2 n w k, iv(w k, eq(level)) small h(1)

* And next two, assuming xtabond updated since May 2004 with update command.

xtabond n yr*, lags(1) pre(w, lags(1,.)) pre(k, endog) robust small noconstant

xtabond2 n L.n w L.w k yr*, gmm(L.(w n k)) iv(yr*) noleveleq robust small

* And next two

xtdpd n L.n L(0/1).(w k) yr1978-yr1984, dgmm(w k n) lgmm(w k n) liv(yr1978-yr1984) vce(robust) two hascons

xtabond2 n L.n L(0/1).(w k) yr1978-yr1984, gmm(L.(w k n)) iv(yr1978-yr1984, eq(level)) h(2) robust twostep

* Three ways to reduce the instrument count

xtabond2 n L.n L(0/1).(w k) yr1978-yr1984, gmm(L.(w k n)) iv(yr1978-yr1984, eq(level)) h(2) robust twostep pca

xtabond2 n L.n L(0/1).(w k) yr1978-yr1984, gmm(L.(w k n), collapse) iv(yr1978-yr1984, eq(level)) h(2) robust twostep

xtabond2 n L.n L(0/1).(w k) yr1978-yr1984, gmm(L.(w k n), lag(1 1)) iv(yr1978-yr1984, eq(level)) h(2) robust twostep

转载请注明:数据分析 » Tips 102:xtabond2 搞定动态面板

喜欢 (0)or分享 (0)