Open-Source Econometrics · ERC Really Credible

Heterogeneity-Robust
Difference-in-Differences

An ecosystem of causal inference tools for panel data — available in Stata, R, and Python — built on the research of de Chaisemartin & D'Haultfoeuille.

Explore Packages Team DiD Book — coming soon did_multiplegt_dyn Tutorial ↗ GitHub ↗
Stata ssc install did_multiplegt_dyn
R install.packages("DIDmultiplegtDYN")
Python pip install py-did-multiplegt-dyn

Libraries

Our Packages

Each family groups the same estimator across languages — pick Stata, R, or Python depending on your workflow. All share the same methodology and paper.

did_multiplegt_dyn
Event-study DiD · Multiple groups & periods
Stata R Python

Flagship package. Heterogeneity-robust estimators for staggered first switch designs, where groups experience their first treatment change at different points in time. Those are very general designs, where the treatment may be non binary and/or non-absorbing (groups may experience several treatment switches). Of course, the package can also be used with a binary and staggered design. The estimators computed by the package allow for effects of lagged treatments on the outcome. Based on de Chaisemartin and D'Haultfoeuille (2020) and de Chaisemartin and D'Haultfoeuille (2025).

Stata ssc install did_multiplegt_dyn
R install.packages("DIDmultiplegtDYN")
Python pip install py-did-multiplegt-dyn
did_multiplegt_stat
DiD with continuously distributed treatments
Stata

Like _dyn, _stat computes heterogeneity-robust DID estimators in general designs, where the treatment may be non binary and/or non-absorbing. Unlike _dyn, _stat assumes that lagged treatments do not affect the current outcome beyond a pre-determined lag. On the one hand, allowing for effects of lagged treatments up to any lag is appealing, to avoid misspecification. On the other hand, allowing for this generality also has some downsides: it may yield harder to interpret estimators, which rely on a parallel-trends assumption over a longer horizon. Thus, in settings where past treatments are unlikely to affect the outcome for very long, _stat is an interesting alternative to _dyn. Based on de Chaisemartin and D'Haultfoeuille (2020) and de Chaisemartin et al (2022).

Stata ssc install did_multiplegt_stat
R install.packages("DIDmultiplegtStat")
did_had
Heterogeneous Adoption Designs
Stata R Python

Computes heterogeneity-robust DID estimators, in heterogeneous adoption designs where all groups start receiving heterogeneous treatment doses at the same date and no group remains fully untreated. In such designs, all groups experience their first treatment change at the same date (there are no stayers), so _stat and _dyn cannot be used. Based on de Chaisemartin et al (2025).

Stata ssc install did_had
R install.packages("DIDhad")
Python pip install did-had
twowayfeweights
TWFE Diagnostic
Stata R

Computes the implicit weights attached to two-way fixed effects regressions, as well as summary measures of these regressions' robustness to heterogeneous treatment effects. Based on de Chaisemartin and D'Haultfoeuille (2020)

Stata ssc install twowayfeweights
R install.packages("TwoWayFEWeights")
yatchew_test & stute_test
Linearity Tests
Stata R

Non-parametric tests of the linearity of a conditional expectation, based on Yatchew (1997) and Stute (1997). Can be useful to test the homogeneous and linear effect assumption underlying two-way fixed effects regressions.

R install.packages("yatchew")
Stata ssc install yatchew_test, replace net install stute_test, from("https://raw.githubusercontent.com/chaisemartinPackages/stute_test/main/Stata/dist/git") replace
multisite
Multi-site Randomized Experiments
Stata

Estimators for treatment-effect heterogeneity across sites in multi-site randomized experiments with few units per site. Based on de Chaisemartin & Deeb (2023).

Stata ssc install multisite
dist_lag_het
Complex Designs · Distributed Lags
R

Estimates average effects of current and lagged treatments, under a parallel-trends assumption and a distributed-lag model allowing for heterogeneous effects across units. Based on de Chaisemartin and D'Haultfoeuille (2025).

R devtools::install_github("chaisemartinpackages/dist_lag_het")
Data & Replications
Datasets · Replication Packages
Stata

ReplicationPackages contains full replication code for published papers. ApplicationData provides the datasets used in empirical applications of the estimators.


Built on rigorous
identification theory

All packages implement heterogeneity-robust estimators valid under parallel trends — even with staggered adoption and treatment effect heterogeneity. They provide credible alternatives to TWFE regressions, whose implicit weighting can be negative and cause sign reversals.

ERC Really Credible Team

The Team

Led by Clément de Chaisemartin at Sciences Po, maintained by predoctoral research fellows funded by the ERC Really Credible grant.

Principal Investigator

Clément de Chaisemartin
Clément de Chaisemartin
Principal Investigator
Sciences Po · CEPR
ERC Really Credible Grant Holder

Current Predocs

Anzony Quispe
Anzony Quispe
Predoc · 2025–2026
Sciences Po
David Arboleda Carcamo
David Arboleda Carcamo
Predoc · 2024–2026
Sciences Po

Alumni

Romain Angotti
Romain Angotti
Predoc · 2024–2025
Now: PhD, Stanford University
Bingxue Li
Bingxue Li
Predoc · 2024–2025
Now: PhD, U. Illinois Urbana-Champaign
Diego Ciccia
Diego Ciccia
Predoc · 2023–2024
Now: PhD, Northwestern University
Felix Knau
Felix Knau
Predoc · 2023–2024
Now: PhD, LMU Munich
Doulo Sow
Doulo Sow
Predoc · 2023–2024
Now: Senior Research Specialist, Princeton
Mélitine Malézieux
Mélitine Malézieux
Predoc · 2022–2023
Now: PhD, Stockholm School of Economics