Effects option does not take effects for predict method?
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start at the PanelOLS result's predict method and compare its effects=True and effects=False behavior with fitted_values, using the supplied wage-panel example. Read the discussion to determine the intended meaning of the option. Done means the behavior is clarified or corrected and verified against that expectation.
由索引模型根据 Issue 内容生成。
描述
Hi there,
I am using linearmodels to modelling panel data. I just found that the predict method returned me exactly identical results whether I set effects option True or False. They are identical to fitted_values, too, if predictions were made on model data. I believe they are all predictions made by slope and common constant only? Below I provide my codes and relevant outputs for you to check. If no difference, then I do not comprehend the significance of effects option. Or does this option has some other meanings that I do not know?
- Codes
from linearmodels.datasets import wage_panel
import pandas as pd
data = wage_panel.load()
data = data.set_index(["nr", "year"])
from linearmodels.panel import PanelOLS
exog_vars = ["expersq", "union", "married"]
exog = sm.add_constant(data[exog_vars])
mod = PanelOLS(data.lwage, exog, entity_effects=True)
fe_res = mod.fit()
fe_res.predict(exog.head(), effects = False)
fe_res.predict(exog.head(), effects = True)
fe_res.fitted_values.head()
- Outputs

Thanks in advance!
- 主要语言
- Python
- 星标
- 1.1k
- 派生
- 203
- 平均合并
- 3 小时 26 分钟
- 30 天内合并 PR
- 115
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bashtage/linearmodels 的其他 Issue
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
bashtage/linearmodels#832 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 25/100
bashtage/linearmodels#831 · 1 条评论 ·
维护者通常 1 天内回复
-
IV: LIML kappa with an endogenous regressor spanned by the instruments, kappa's unit dependence, scale-dependent instrument rank check可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 4/5 3-5 天 新手友好度 25/100
bashtage/linearmodels#823 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 18/100
bashtage/linearmodels#817 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
bashtage/linearmodels#780 ·
维护者通常 1 天内回复
查看 bashtage/linearmodels 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
aws-samples/sample-per-model-bedrock#639 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 86/100
awslabs/visual-asset-management-system#937 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
project-codeflare/codeflare-sdk#1195 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
pandas-dev/pandas-stubs#2051 ·
维护者通常 1 天内回复