全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
7043 8
2009-07-25
最近在做跨国数据时发现hausman检验得出随机效应,我想问下stata有没有命令能做双向随机效应的模型?
二维码

扫码加我 拉你入群

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

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

全部回复
2009-7-25 09:29:08
stata没有相关命令直接作双效应模型。参见Baum的An introduction to modern econometrics using stata 224页,有这么一段话。
Stata lacks a command to automatically fit two-way FE models. If the number of periods is reasonably small, we can fit a tow-way FE model by creating a set of time indicator variables and including all but one in the regression. the joint test that all the coefficients on those indicator variables are zero will be a test of the significance of time FE.
二维码

扫码加我 拉你入群

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

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

2009-7-26 00:03:14
不会吧,很容易实现啊
假定时间是year
直接输入
xi: y x i.year,fe r
就是一个双向的面板固定效应回归啊,同理随机效应也一样


quote]kollenfree 发表于 2009-7-25 09:29
stata没有相关命令直接作双效应模型。参见Baum的An introduction to modern econometrics using stata 224页,有这么一段话。
Stata lacks a command to automatically fit two-way FE models. If the number of periods is reasonably small, we can fit a tow-way FE model by creating a set of time indicator variables and including all but one in the regression. the joint test that all the coefficients on those indicator variables are zero will be a test of the significance of time FE.
二维码

扫码加我 拉你入群

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

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

2009-7-26 06:30:52
two-way random effects i use xtmixed.
二维码

扫码加我 拉你入群

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

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

2009-7-26 16:37:14
多谢几位热心解答
二维码

扫码加我 拉你入群

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

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

2009-7-27 20:54:41
3楼的做法同我的回答并没有矛盾,xi: i.year恰好就是我所说的时间虚拟变量。不过感觉命令应该是xi: xtreg y x i.year, fe。另外也可以自己生成虚拟变量ta(year), gen(yr),然后 xtreg y x yr*, fe。还有其他一些方法做,但思想都是一样的。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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