skillfed

pyhdfe

High dimensional fixed effect absorption with Python 3

pyhdfe v0.2.0 498.9K downloads/30d#6,326 on PyPI60
Permissive license MIT DORMANT released

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 pyhdfe

uv

uv add pyhdfe

poetry

poetry add pyhdfe

Installing 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

Development Status :: 4 - BetaIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering

Tags

fixed effects absorptionhigh dimensional fixed effectsregression fixed effectsfixed effect algorithmsstatistical fixed effects pythonabsorb fixed effectshdfe regression
econometricsfixed-effectsregression-tools

More Scientific/Engineering packages