StatsPAI: A Unified, Agent-Native Python Toolkit for Causal Inference and Applied Econometrics

Read full text
Authors: Biaoyue Wang, Scott Rozelle
Cited by: 1
References: 19

Abstract

StatsPAI is an open-source Python package for causal inference and applied econometrics.It gives empirical researchers a single interface for estimating, diagnosing, comparing, and reporting models that are otherwise spread across many specialized packages or proprietary statistical environments.A single import statspai as sp reaches estimators for the main families of applied work: regression and panel models, instrumental variables, the modern difference-in-differences and regression-discontinuity toolkits, synthetic control and matching, and machine-learning estimators of heterogeneous treatment effects.It also covers the diagnostics, robustness checks, and reporting that surround them.The full catalogue of more than 1,100 registered functions across more than 80 submodules is enumerated in the package documentation rather than here.Results from the mature estimators share a common reporting surface, so the same calls produce a summary, a figure, a LaTeX or Word table, or a citation.StatsPAI is also agent-native.Every registered function exposes a machine-readable schema, a structured description of its arguments and outputs that a program can parse directly, together with structured failure metadata.Such schemas let large language model (LLM)-driven research assistants discover estimators, choose among alternatives, and surface a method's assumptions without parsing free-form prose, the capability that most distinguishes StatsPAI from a conventional estimator library.The source code is available at https://github.com/brycewang-stanford/StatsPAIand archived on Zenodo (Wang & Rozelle, 2026).

Fields of Study & Subjects

Advanced Causal Inference Techniques Bayesian Modeling and Causal Inference Explainable Artificial Intelligence (XAI)

Publication details

Journal / source
The Journal of Open Source Software
Publisher
The Open Journal
Volume
11
Issue
125
Pages
10604–10604
Publication date
3 September 2026