Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Effects option does not take effects for predict method?

Offen
#260 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
32/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
data

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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!

Vorherrschende Sprache
Python
Sterne
1.1k
Forks
203
Ø Merge
3 Std. 26 Min.
Gemergte PRs (30 T.)
115

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus bashtage/linearmodels

Alle Issues in bashtage/linearmodels

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.