全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
20917 16
2016-08-12
请教大家:面板数据只有一个工具变量是不是用这个命令?x2是内生变量 xtivreg y x1 (x2=z),fe 我用这个命令做出的结果中木有工具变量z的系数。 另外如何用hausman检验内生性?
二维码

扫码加我 拉你入群

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

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

全部回复
2016-8-12 17:16:35
z是x2的IV,模型中没有z,只有x2,z只是工具而已
二维码

扫码加我 拉你入群

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

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

2016-8-12 18:11:00
guojianhao 发表于 2016-8-12 17:16
z是x2的IV,模型中没有z,只有x2,z只是工具而已
应该结果有z的系数吧
二维码

扫码加我 拉你入群

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

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

2016-8-12 18:33:21
xtivreg y x1 x2,fe
est store m1
xtivreg y x1 (x2=z),fe
est store m2
hausman m1 m2
以上命令是检验内生性的。祝好运~
二维码

扫码加我 拉你入群

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

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

2016-8-12 20:09:38
xddlovejiao1314 发表于 2016-8-12 18:33
xtivreg y x1 x2,fe
est store m1
xtivreg y x1 (x2=z),fe
谢谢您的解答!但是不知道为什么我用xtivreg y x1 (x2=z),fe 这个命令 结果中没有z的系数
二维码

扫码加我 拉你入群

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

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

2016-9-4 10:39:43
mbygzh 发表于 2016-8-12 20:09
谢谢您的解答!但是不知道为什么我用xtivreg y x1 (x2=z),fe 这个命令 结果中没有z的系数
建议你先弄明白工具变量法的含义,这个xtivreg默认的是2sls方法,见stata帮助文件xt:
xtivreg offers five different estimators for fitting panel-data models in which some of the right-
hand-side covariates are endogenous. These estimators are two-stage least-squares generalizations of
simple panel-data estimators for exogenous variables. xtivreg with the be option uses the two-
stage least-squares between estimator. xtivreg with the fe option uses the two-stage least-squares
within estimator. xtivreg with the re option uses a two-stage least-squares random-effects estimator.
There are two implementations: G2SLS from Balestra and Varadharajan-Krishnakumar (1987) and
EC2SLS from Baltagi. The Balestra and Varadharajan-Krishnakumar G2SLS is the default because it is
computationally less expensive. Baltagi’s EC2SLS can be obtained by specifying the ec2sls option.
xtivreg with the fd option requests the two-stage least-squares first-differenced estimator.

二阶段最小二乘法,第一阶段是用内生解释变量(你这里的X2)对工具变量回归(z),得到x2的拟合值,然后在第二阶段,用这个拟合值作为解释变量对模型进行回归的。一般默认的2sls只显示第二阶段的结果,不会显示z. 你如果想看z的系数,可以在后面加入 r first,即xtivreg y x1 (x2=z), fe r first. 但是其中z的系数反映的是x2=α+βz+ϵ的回归结果,这个系数与y无关
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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