Causal inference toolkit

EconAI

Open causal-inference toolkit for applied economists.

Summary

EconAI is a modular, open source Python toolkit that consolidates 12 causal estimators, publication-ready figure generators, and literature integration into a single workflow. It reflects the methods Deluair uses in its own published research and is designed for analysts who need defensible causal estimates without rebuilding the plumbing every time. The toolkit has shipped in production across five peer-reviewed papers spanning wine, wood, beef, and food demand systems.

What it is

EconAI packages the canonical causal-inference workflow into a reusable Python library. The estimator surface covers OLS, instrumental variables, panel fixed effects, difference-in-differences, staggered DiD with heterogeneous timing, Synthetic DiD, regression discontinuity, Double Machine Learning, Causal Forests, shift-share instruments, partial identification bounds (Manski and Rambachan-Roth), and randomization inference. Every estimator returns standard tables, robust and clustered standard errors, and diagnostic plots through a consistent API, so research teams can swap methods without rewriting code.

Figure generation, binscatter, coefficient plots, and event-study graphs, ships alongside the estimators with publication-grade defaults. A literature module pulls citations from OpenAlex and Semantic Scholar to assemble BibTeX bibliographies and surface the closest prior work for any research question. The reference codebase is 47 Python modules and roughly 13,500 lines, used by Deluair and BDPolicyLab to deliver quantitative briefs on tariffs, agricultural value chains, and demand systems. Releasing it under an open license lets clients audit every estimate, reproduce results, and extend the library without licensing friction.

Methodology

  • Twelve estimators covering OLS, IV, Panel FE, DiD, Staggered DiD, and Synthetic DiD
  • Design-based methods including RDD, randomization inference, and shift-share instruments
  • Machine learning estimators with Double ML and Causal Forests for heterogeneous effects
  • Partial identification via Manski bounds and Rambachan-Roth sensitivity analysis
  • Publication-ready figure generators for binscatter, coefficient plots, and event studies
  • Literature integration through OpenAlex and Semantic Scholar with automated BibTeX export
  • Consistent API across estimators with robust, clustered, and bootstrap standard errors
  • Diagnostic suite for parallel trends, first-stage strength, and overlap checks

Data sources

  • Works on any panel, cross-section, or repeated cross-section dataset supplied by the user
  • OpenAlex for open scholarly metadata and citation graphs
  • Semantic Scholar for paper-level recommendations and reference resolution
  • Compatible with public micro datasets such as ACS, Eurostat, and World Bank panels
  • Bring-your-own administrative or proprietary panel data

Deliverables when used in engagements

  • Open source Python package installable via pip with versioned releases
  • Reference notebooks reproducing five published applied economics papers
  • Estimator and figure documentation with worked examples per method
  • BibTeX export pipeline tied to OpenAlex and Semantic Scholar queries
  • Extension hooks for custom estimators, weights, and inference routines