StatsPAI_skill
Installation
SKILL.md
StatsPAI: Agent-Native Causal Inference & AER-Style Empirical Workflow
StatsPAI is the agent-native Python package for causal inference and applied econometrics: one import statspai as sp, 900+ functions behind a self-describing API, and CausalResult objects that export to LaTeX / Word / Excel / BibTeX.
This skill drives StatsPAI through the canonical pipeline of an applied AER empirical paper. Each step maps to a section of the published paper and emits a paper-ready artifact (Table 1, event-study figure, Table 2 main results, robustness panel, replication stamp).
- Source: https://github.com/brycewang-stanford/StatsPAI
- Install:
pip install statspai(>= 1.6) - Paper: submitted to JOSS (under review)
Why for Agents
- Self-describing:
sp.list_functions()/sp.describe_function(name)/sp.function_schema(name)— every public symbol is discoverable without doc lookup. - Unified result: every estimator returns
CausalResultwith.summary(),.plot(),.diagnostics,.to_latex(),.to_word(),.cite(). - One import, full pipeline: data contract → Table 1 → estimand-first DSL → identification graphs → main table → heterogeneity → mechanisms → robustness → replication package.
- Estimand-first:
sp.causal_question(...).identify()forces the "DID vs RD vs IV?" decision before estimation, with the identifying assumption written down — the way a referee expects to read it.