pyhdfe
High dimensional fixed effect absorption with Python 3
What it is and what it does
PyHDFE is a Python library for absorbing high-dimensional fixed effects in regression problems. It implements algorithms designed to be incorporated into statistical workflows rather than provide a complete regression interface—the goal is to offer performant fixed-effect absorption that researchers can embed in their own projects.
The package depends on numpy and scipy, installs as a pure Python wheel with low friction, and is tested on Python versions 3.6 through 3.9. It was created to facilitate fair comparison of fixed-effects algorithms previously implemented in various languages and to support statistical projects that need efficient fixed-effect handling as a component, not a standalone tool.
Use it for:
- Absorb fixed effects in large econometric datasets before fitting other models.
- Compare fixed-effects absorption algorithms across different implementations and convergence criteria.
- Integrate fixed-effect absorption into custom statistical pipelines or research code.
- Handle high-dimensional categorical variables in regression preprocessing workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyHDFE absorbs high-dimensional fixed effects from regression data using optimized algorithms, designed for integration into statistical projects rather than as a standalone regression interface.
Yes, if you need to absorb fixed effects as a component of a statistical project and are comfortable integrating it into your own code rather than using a turnkey regression interface. The low install friction, permissive license, and stable dependencies make it straightforward to add. The dormant maintenance is not a blocker for a mature algorithm library, but verify that the specific algorithms and convergence criteria meet your research needs.
Install
pyhdfe on PyPI
pip
pip install pyhdfeuv
uv add pyhdfepoetry
poetry add pyhdfeInstalling pyhdfe
Before you install
Low friction: pure Python wheel with only numpy and scipy as dependencies. Dormant maintenance—last release 1092 days ago with a commit in February 2024—but the repository remains active and unarchived, suggesting stable rather than abandoned status.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute the package freely as long as you include the license notice.
Quickstart
pip install pyhdfe
import pyhdfe
# Use pyhdfe algorithms to absorb fixed effects in your regression data
Requires Python 3.6 or later; numpy and scipy must be installed.
Verify before relying
- Specific algorithm implementations and convergence criteria supported by the package.
- Performance benchmarks or scaling characteristics for different problem sizes.
- Whether the package is actively maintained or in stable maintenance mode.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, scipy |
| Maintenance | dormant — 1,092 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 498,890/month — #6,326 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyhdfe-0.2.0-py3-none-any.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
pyfixestPyFixest performs fast high-dimensional fixed…
permissive · top 15,000 on PyPI
hyppohyppo provides multivariate hypothesis testing…
permissive · top 15,000 on PyPI
linearmodelsProvides panel regression, instrumental…
unclear · top 15,000 on PyPI
pybaselinesProvides 50+ baseline correction algorithms for…
permissive · top 15,000 on PyPI
econmlEconML estimates heterogeneous treatment…
permissive · top 15,000 on PyPI
cemImplements Coarsened Exact Matching (CEM), a…
unclear · top 5,000 on PyPI
psmpyPsmPy implements propensity score matching for…
permissive · top 5,000 on PyPI
dowhyDoWhy is a Python library for causal inference…
permissive · top 15,000 on PyPI
statsmodelsstatsmodels provides statistical models,…
permissive · top 1,000 on PyPI
rdrobustImplements regression discontinuity (RD) design…
copyleft · top 15,000 on PyPI