楼主: yanbridge
18012 15

[问答] R 面板分析为何无截距(固定效应模型) [推广有奖]

11
蘿蔔thr 学生认证  发表于 2017-12-15 10:53:02
ywh19860616 发表于 2011-8-27 20:29
> library(plm)
> data(Grunfeld)
> grun.fe1 summary(fixef(grun.fe1,type="level"))
只能这样得到截距项吗?

12
蘿蔔thr 学生认证  发表于 2017-12-15 10:53:06
ywh19860616 发表于 2011-8-27 20:29
> library(plm)
> data(Grunfeld)
> grun.fe1 summary(fixef(grun.fe1,type="level"))
只能这样得到截距项吗?

13
rano96 学生认证  发表于 2018-5-31 12:55:40
ywh19860616 发表于 2011-8-27 20:29
> library(plm)
> data(Grunfeld)
> grun.fe1 summary(fixef(grun.fe1,type="level"))
summary(fixef(grun.fe1,type="level"))
summary(fixef(grun.fe1,type="dmean"))

想请教一下“level”和“demean”分别指的是什么?
另外固定效应模型,每个个体都有各自不同的截距,那这个截距到底是“level”和“demean”哪个算出来的?

14
hifinecon 发表于 2018-5-31 15:39:25
great answer!

15
chien_bill 发表于 2019-5-19 21:21:17
a fixed effects (within) model does not have a single intercept: it has
N. I suggest you have another look at FE models' theory.

Some confusion often stems from Stata (misleadingly, IMHO) reporting an
"intercept" which is actually the average of the individual intercepts,
which you can recover in R as 'mean(fixef(<yourmodel>))'. Remember,
though, that this isn't "the intercept" of the estimated model in the
usual sense of the term. If you "need" an intercept, then you must
review your specification.

如果你一定要一个数字,可以使用
代码:
mean(fixef(yourmodel))
算出截距项的平均值

16
QQQQQQ1998 发表于 2022-8-16 13:55:53
请问如何一次性得到包括效应值和截距的结果呢?我在R上运行时没有截距显示R方为负值,在stata上运行就会同时显示效应值和截距项,且得到的R方均大于0.9,请问R软件能得到这种形式的结果吗

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-2-28 00:45