楼主: ghzstudio
28384 16

[学习心得] xtabond2和xtdpdsys的区别   [推广有奖]

  • 2关注
  • 20粉丝

教授

11%

还不是VIP/贵宾

-

威望
0
论坛币
9209 个
通用积分
4083.1030
学术水平
102 点
热心指数
100 点
信用等级
97 点
经验
6450 点
帖子
339
精华
2
在线时间
1616 小时
注册时间
2008-11-23
最后登录
2024-4-7

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
看到坛子上有人提问,集中了《How to do xtabond2》Roodman (2009)的一些讨论和自己做模型过程中的一些积累,简要做了个总结。


1)最大的区别是,xtabond2将外生变量(iv中给出)的滞后项也作为了level equation的工具变量,而xtdpdsys不这么做。
通过在xtabond2中设置iv( 外生变量列 ,eq(d) )可以使两者一样。

2)还有是工具变量矩阵的设定不同。这一点大部分不是专门研究计量理论的人可以忽略,xtabond2有一个h(#)设置,默认#是3,而系统dpd用的是2,这是之前gauss和ox程序下延续下来的。
The h(#) option, which most users can safely ignore, controls the choice of H. h(1) sets H = I, for both difference and system GMM. For difference GMM, h(2) and h(3) coincide. They differ for system GMM, however, with h(2) imitating DPD for Ox and h(3) being the xtabond2 default。


3)另外,xtdpdsys和xtabond2在差分方程的正交化处理之后,在常数项的对待上有不同,前者在在正交化之后又加上了常数项(差分过程本身会把常数项去掉)。
noconstant excludes the constant term from X and Z; however, it has no effect in difference GMM because differencing eliminates the constant anyway.
Here xtabond2 differs from xtabond, xtdpd, and DPD, which by default enter the constant in
difference GMM after transforming the data. DPD does the same for time dummies. xtabond2
avoids this practice for several reasons. First, in Stata, it is more natural to treat time dummies,
typically created with xi, like any other regressor, transforming them. Second, introducing the
constant term after differencing is equivalent to entering t as a regressor before transformation,
which may not be what users intend. By the same token, it introduces an inconsistency with
system GMM: in DPD and xtdpdsys, when doing system GMM, the constant term enters only
in the levels equation, and in the usual way; it means 1 rather than t. Thus switching between
difference and system GMM changes the model. However, these problems are minor as long as a full
set of time dummies is included. Because the linear span of the time dummies and the constant
term together is the same as that of their first differences or orthogonal deviations, it does not
matter much whether the time dummies and constant enter transformed or not.

举个例子,使用网上下载的abdata。
webuse abdata



下面几组命令的结果应当一致
// CASE #1- W 严格外生
xtdpdsys n w, two vce(robust)
xtabond2 n l.n w, gmm(l.n) iv(w, eq(dif)) h(2) two robust
//CASE #2- W 是predetermined(弱外生)
xtdpdsys n, pre(w) two vce(robust)
xtabond2 n l.n w, gmm(l.n w) h(2) two robust
// CASE #3- W 内生
xtdpdsys n, endo(w) two vce(robust)
xtabond2 n l.n w, gmm(l.n l.w) h(2) two robust



关于两者是否都能做内生和先决变量区分,答案显然是两者都可以。
个人感觉xtabond2更加灵活,但手动性操作对原理的认识要求也就更高,相当于个手动模式的单反相机。
二维码

扫码加我 拉你入群

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

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

关键词:xtdpdsys XTABOND xtdpd abond Sys equation option 娄山关 最大的 程序

已有 5 人评分学术水平 热心指数 信用等级 收起 理由
momingqimiao7 + 5 + 5 + 5 精彩帖子 https://bbs.pinggu.org/thread-1.
Sunknownay + 3 + 3 + 3 鼓励积极发帖讨论
静水深流 + 1 观点有启发
daiermande + 1 + 1 + 1 观点有启发
ywh19860616 + 3 + 3 + 3 受启发

总评分: 学术水平 + 13  热心指数 + 12  信用等级 + 12   查看全部评分

沙发
auirzxp 学生认证  发表于 2013-12-1 12:56:22 |只看作者 |坛友微信交流群
好,收藏 了。

使用道具

藤椅
higherren 发表于 2013-12-1 15:31:21 |只看作者 |坛友微信交流群
xtabond2是默认把ivstyle里面的变量都取滞后项同时作为差分、水平方程的工具变量;xtdpdsys默认只用于差分方程。
并且,xtdpdsys将没有设定为内生或先决变量的都自动作为外生变量,将其滞后项用作工具变量估计差分方程; xtabond2中可以有一部分在前面的回归变量中列出,但既不列入gmmstyle,也不列入ivstyle,这样就不参与差分和水平方程的估计了(主要是一些滞后项)。
xtdpd的灵活性基本跟xtabond2一样,但更加简洁,就是可以直接、分别地设定差分估计和水平估计中采用gmm形式(一个多列矩阵)和iv形式(一个包含自身滞后的列向量)的变量。
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Sunknownay + 3 + 3 + 3 奖励积极上传好的资料

总评分: 学术水平 + 3  热心指数 + 3  信用等级 + 3   查看全部评分

使用道具

板凳
Nicolle 学生认证  发表于 2013-12-12 00:31:37 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

报纸
tony2040044 发表于 2013-12-12 11:50:07 |只看作者 |坛友微信交流群
想问下lz遇到过这种情况没:

我用xtabond2,它的AR(1)建议的p值为.,就是missing了,这种情况是什么原因?感谢

使用道具

地板
fei355 发表于 2013-12-26 12:09:28 |只看作者 |坛友微信交流群
非常不错的解释
我就是我!

使用道具

7
duidui1990 发表于 2014-10-23 01:09:52 |只看作者 |坛友微信交流群
楼主,您好!关于xtabond2(加了eq(dif))能做出xtdpdsys的结果,我不知道怎么做到,因为我挺想报告hansen检验,我将两个命令工具变量对照过了,工具变量不管是水平方程还是差分方程是一致的,但是结果却不同,不知道是不是这两个算法是不是不一样,也试过nom。望楼主能给予我帮助。谢谢

使用道具

8
@浪花朵朵开 发表于 2014-10-23 22:51:14 |只看作者 |坛友微信交流群
好东西值得收藏

使用道具

9
lanvinder 发表于 2016-4-12 10:54:56 |只看作者 |坛友微信交流群
绝对值得收藏

使用道具

10
白富美2 发表于 2016-5-12 17:29:16 |只看作者 |坛友微信交流群
求问,xtabond2 中hansen检验的原假设是什么?如果用xtabond2回归时加了robust,工具变量有效性检验还能看sargan检验吗?

使用道具

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

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

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

GMT+8, 2024-5-1 07:19