Software

Open-source econometrics packages for causal inference — difference-in-differences, panel treatment effects, and economic data science.

Difference-in-Differences

diff-diff

Python · Contributor · PyPI

Contributed the Lee–Wooldridge rolling-transformation DiD estimator (9 modules, 222 tests) to Isaac Gerber's diff-diff, a Python library aggregating modern difference-in-differences estimators — Callaway–Sant'Anna, Synthetic DiD, Honest DiD, and event studies — with a sklearn-style API validated against R.

PythonDiDContributionCausal Inference
lwdid
2025

Python · R · PyPI

Lee–Wooldridge (2025, 2026) rolling-transformation DiD estimator for panel data. Supports common-timing and staggered-adoption designs, RA/IPW/IPWRA/PSM estimators, exact small-sample permutation inference, wild cluster bootstrap, and rich diagnostics with LaTeX/CSV export.

PythonRDiDSmall SamplesPanel Data
diddesign

Stata · Python · PyPI · SSC

Double Difference-in-Differences (Egami & Yamauchi, 2023), optimally combining standard and sequential DID moments via GMM for settings with multiple pre-treatment periods. Supports staggered adoption, parallel-trends equivalence diagnostics, J-test screening, and multi-core parallel bootstrap inference.

StataPythonDiDGMMStaggered Adoption
contdid

Python

Continuous-treatment difference-in-differences: dose–response curves, event-study dynamics, and uniform confidence bands for settings where treatment intensity varies rather than simply switching on or off.

PythonDiDContinuous TreatmentCausal Inference

R

Semiparametric triple-difference (DDD) estimators for panel and repeated cross-section settings, with doubly-robust influence-function-based scores and machine-learning flexibility for nuisance-function estimation.

RTriple DifferencesSemiparametricCausal Inference
hddid
2025

Stata · Python

Doubly robust semiparametric DiD for high-dimensional covariates (Ning, Peng & Tao, 2020). Cross-fitted AIPW estimation with Lasso penalization, CLIME debiasing, polynomial/trigonometric sieve bases, and bootstrap uniform confidence bands.

StataPythonDiDHigh-DimensionalAIPW
didhetero

Stata

Doubly robust uniform confidence bands for group-time conditional average treatment effects (CATT) in staggered DiD (Imai, Qin & Yanagi, 2025, JBES). Combines IPW with outcome regression via local polynomial smoothing, aggregated into event-study, group, calendar, and simple summaries.

StataDiDTreatment HeterogeneityCausal Inference
equitrends

Stata · Python

Equivalence tests for pre-trends in DiD (Dette & Schumann, 2024, JBES), implementing the EquiTrends R package. Three equivalence hypotheses (max, mean, RMS), minimum equivalence thresholds, spherical and wild bootstrap inference, and visualization with equivalence bounds.

StataPythonDiDEquivalence TestingPre-Trends
pretest

Stata · Python

Conditional extrapolation pre-test for DiD (Mikhaeil & Harshaw, 2025). An asymptotically consistent pre-test for the extrapolation condition, a pass/fail decision rule, and conditionally valid bias-adjusted confidence intervals for the ATT with guaranteed asymptotic coverage.

StataPythonDiDPre-TestingCausal Inference

Beyond DiD: RD, Synthetic Control & Structural Breaks

2026

Stata

Estimation and inference for boundary regression discontinuity designs using location- and distance-based methods, with MSE-optimal bandwidth selection, robust bias correction, and uniform confidence bands.

StataRegression DiscontinuityBoundary RDCausal Inference

Stata

Conformal inference and cross-fit t-tests for synthetic-control designs (Chernozhukov, Wüthrich & Zhu, 2021 JASA; 2018 COLT; 2026 JPE), providing exact finite-sample p-values for comparative case studies.

StataSynthetic ControlConformal InferenceCausal Inference
xtbreak

Python · R

Bai–Perron structural break detection and estimation for time series and panel data. Tests for breaks (supF, UDmax, WDmax), estimates break dates with confidence intervals, and selects break counts via sequential testing or information criteria, with fixed-effects and common-correlated-effects support.

PythonRStructural BreaksPanel DataTime Series

Python

Tests for whether treatment effects operate through specific mechanisms (Kwon & Roth, 2026, Review of Economic Studies), implementing finite-support sharp-null tests, minimum-defier bounds, and partial density diagnostics.

PythonMechanism TestsTreatment EffectsCausal Inference

Weighting, Balancing & Panel Treatment Effects

TROP
2025

Stata · Rust backend · SSC

Triply Robust Panel (TROP) estimator (Athey, Imbens, Qu & Viviano, 2025). Combines unit weights, time weights, and nuclear-norm-regularized low-rank regression adjustment to estimate ATT in panel data, with twostep/joint estimation, LOOCV tuning, and bootstrap inference on a high-performance Rust backend.

StataRustPanel DataCausal Inference
wfe
2025

Stata

Weighted Fixed Effects (WFE) and Propensity-score Weighted Fixed Effects (PWFE) estimators (Imai & Kim, 2021, Political Analysis). Derives observation-specific weights targeting ATE/ATT, supports one-way/two-way FE, first-difference, and matched DiD, with a White misspecification test.

StataFixed EffectsPanel DataCausal Inference
CBPS
2025

Python · PyPI

Covariate Balancing Propensity Score (CBPS) for robust causal inference. Supports binary, multi-valued, and continuous treatments via a GMM framework, including hdCBPS, npCBPS, marginal structural models (CBMSM), and instrumental variables (CBIV), numerically accurate within ±1e-6 of the CBPS R package.

PythonPropensity ScoreGMMCausal Inference

AI-Assisted Development

StatsClaw

Claude Code · OpenAI Codex · Multi-Agent Framework

A multi-agent workflow framework that builds, tests, and documents statistical software packages with adversarial verification. Implements the StatsClaw methodology (Qin & Xu, 2026) with 8 specialized AI roles operating under strict information barriers; available for both Claude Code and OpenAI Codex.

AIMulti-AgentSoftware DevelopmentCodex

AI Skills for Econometrics

AI Agent Skill · R

An AI agent skill for the Roth & Sant'Anna (2023) semiparametric-efficient estimator for staggered rollout designs — three estimators (staggered, staggered_cs, staggered_sa), four aggregation schemes (simple, cohort, calendar, event-study), and Fisher randomization tests, delivering 1.4–3× smaller standard errors than Callaway–Sant'Anna or Sun–Abraham.

AI SkillStaggered DiDCausal InferenceR

AI Agent Skill · R

An AI agent skill for Synthetic Difference-in-Differences (Arkhangelsky et al., 2021), documenting three estimators (SDID, synthetic control, DiD) with weight diagnostics, placebo tests, sensitivity analysis, and a complete R API reference.

AI SkillSynthetic DiDSynthetic ControlCausal Inference

AI Agent Skill · R / Python / Stata

An AI agent skill for local-polynomial regression discontinuity estimation with robust bias-corrected confidence intervals (sharp, fuzzy, and kink RD), covering data-driven bandwidth selection and RD plots — based on Calonico, Cattaneo & Titiunik (2014).

AI SkillRegression DiscontinuityCausal Inference

AI Agent Skill · Python

An AI agent skill for pyfixest, a fast fixed-effects econometrics toolkit — OLS, IV/2SLS, Poisson/GLM, and quantile regression with high-dimensional fixed effects, plus DID estimators (did2s, lpdid), multi-model formula syntax, and publication-ready tables and plots.

AI SkillFixed EffectsPythonEconometrics
2026

AI Agent Skill · R

An AI agent skill for Longitudinal Targeted Maximum Likelihood Estimation — semiparametric-efficient, doubly robust estimation of treatment-specific means and marginal structural model parameters with time-varying treatments, confounders, and censoring (Lendle, Schwab, Petersen & van der Laan, 2017).

AI SkillTMLELongitudinalCausal Inference

AI Agent Skill · Academic Writing

A systematic AI skill for writing R Journal econometrics papers, covering the full workflow from draft to submission with structured guidance on paper architecture, reproducible code examples, and R Journal formatting standards.

AI SkillR JournalAcademic WritingEconometrics