py-econometrics / pyfixest

Fast High-Dimensional Fixed Effects Regression in Python following fixest-syntax
https://py-econometrics.github.io/pyfixest/
MIT License
175 stars 35 forks source link

Implement `feglm()` function to support logistic regression #674

Open s3alfisc opened 3 weeks ago

s3alfisc commented 3 weeks ago
  1. This PR introduces a new function, feglm(), to run generalized linear models. The idea is that users will be able to run different glm's by calling pf.feglm() with a type argument, that supports "logit", "poisson", and "probit".
  2. It adds a new class, Felogit, which runs logistic regression. This is work in progress - most notably, we need to implement the iterated weighted least squares update steps as in Stamann (2018). Felogit currently inherits from the Fepois class. Long term, we'd likely want to implement an abstract GLM class, which all GLM types would then be derived from.
codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 33.96226% with 35 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyfixest/estimation/felogit_.py 43.75% 18 Missing :warning:
pyfixest/estimation/estimation.py 7.14% 13 Missing :warning:
pyfixest/estimation/FixestMulti_.py 33.33% 4 Missing :warning:
Flag Coverage Δ
core-tests 77.22% <33.96%> (-0.50%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pyfixest/__init__.py 81.81% <ø> (ø)
pyfixest/estimation/__init__.py 100.00% <100.00%> (ø)
pyfixest/estimation/FixestMulti_.py 79.31% <33.33%> (-1.41%) :arrow_down:
pyfixest/estimation/estimation.py 84.68% <7.14%> (-11.20%) :arrow_down:
pyfixest/estimation/felogit_.py 43.75% <43.75%> (ø)

... and 4 files with indirect coverage changes