全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5368 3
2019-01-18
悬赏 70 个论坛币 未解决
附件中面板数据,gvkey是公司代码,fyear是时间变量(年份),回归中需要加入 firm fixed effect 和 year fixed effect.

我做了如下两种操作:

1)
xtset gvkey fyear
xi: xtreg f.labrprod1 labrprod1 i.fyear, fe r cluster(gvkey)
2)
xtset gvkey fyear
xtreg f.labrprod1 labrprod1 i.fyear, fe r cluster(gvkey)


两种不应该表达同样的意思吗?为什么估计出来的截距项不一样?哪一种是正确的写法?

已阅读过help xi的文件,但是仍然不明白,求高人指点。非常感谢!

upload.dta
大小:(2.86 MB)

 马上下载





二维码

扫码加我 拉你入群

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

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

全部回复
2019-1-18 18:25:01
我自己想明白了,因为两种方法其实估计结果是相同的,只是用的baseline year不一样,所以截距项不一样,year dummy的系数不一样。btw,怎么删帖啊
二维码

扫码加我 拉你入群

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

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

2019-1-18 18:35:58
The first command creates a series of dummy based on year. E.g. '_Ifyear_1972' treat observations in 1972 as 1 while the rest is valued in 0. Then you got group dummies for the regression and include year FE only. The second command uses the time series, i.e. one dummy for each year. And you use both year and firm FE.

Hope it's helpful to you.
二维码

扫码加我 拉你入群

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

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

2019-1-19 11:46:32
réussite 发表于 2019-1-18 18:35
The first command creates a series of dummy based on year. E.g. '_Ifyear_1972' treat observations in ...
I think both commands included both year and firm FE. They are exactly the same.
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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