Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Effects option does not take effects for predict method?

Đang mở
#260 6 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
32/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug unconfirmed

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
    image

Thanks in advance!

Ngôn ngữ chính
Python
Star
1.1k
Fork
203
Merge trung bình
3 giờ 26 phút
Pull request đã merge (30 ngày)
115

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của bashtage/linearmodels

Tất cả issue của bashtage/linearmodels

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.