ddinteract: Double-Demeaned Interactions Estimator

ddinteract: Double-Demeaned Interactions Estimator

Overview

ddinteract is a Python package that implements the double-demeaned interactions estimator for two-way fixed-effects panel models with interaction terms. It provides a fast, transparent way to estimate interaction effects in panel data settings while properly absorbing unit and time fixed effects.

Installation

pip install ddinteract

Use in My Research

I have used ddinteract in the following papers:

In both projects, the estimator is used to recover heterogeneous effects across units (households, U.S. states) by interacting a shock or policy variable with unit-level characteristics, while absorbing two-way fixed effects.

Documentation and Source Code

Full documentation, usage examples, and the source code are available on the GitHub repository. Issues and contributions are welcome.