楼主: 宜风
5444 3

[回归分析求助] 面板数据,固定效应,回归时加不加xi为什么结果不同? [推广有奖]

  • 0关注
  • 0粉丝

已卖:14份资源

讲师

45%

还不是VIP/贵宾

-

威望
0
论坛币
2781 个
通用积分
240.3385
学术水平
4 点
热心指数
6 点
信用等级
2 点
经验
29305 点
帖子
111
精华
0
在线时间
739 小时
注册时间
2013-8-24
最后登录
2024-3-7

楼主
宜风 发表于 2019-1-18 17:37:44 |AI写论文
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)



关键词:固定效应 面板数据 结果不同 fixed effect Cluster

本帖被以下文库推荐

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

藤椅
réussite 发表于 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.

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-30 02:55