Agent skill

StatsPAI_skill

Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics paper (AER / QJE / JPE / ReStud / AEJ) with DID / RD / IV / SCM / DML / matching, written-out estimating equation + identifying assumption, Table 1 / Table 2 / event-study figure / robustness gauntlet — OR in epidemiology / public health style (target-trial emulation, IPTW + g-formula + TMLE triplet, Mendelian randomization, KM/AFT survival, E-value sensitivity, STROBE/TRIPOD reporting) — OR in ML causal inference style (DML, S/T/X/R/DR meta-learners, causal forest, Drag

brycew6m878★ · +32/wk · 1 repos on radarProfile →
claude-codeNOASSERTION
Install
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill 00-Full-empirical-analysis-skill_StatsPAI --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 142 KB
Bundled scripts: none
Path: skills/00-Full-empirical-analysis-skill_StatsPAI/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,244
Language: Stata
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 4, 2026

What it does

Guides a user through a full empirical/causal analysis workflow in Python, oriented to producing paper-ready artifacts such as Table 1, Table 2, event-study figures, and robustness panels. Emphasizes an estimand-first DSL, identification graphs, and a pipeline that yields exportable results to Word/Excel/LaTeX. Supports multiple flavors (AER-style econometrics, epi/public health causal inference, ML causal methods, and distributional/gap-decomposition approaches).

How it works

The skill describes importing the package as import statspai as sp and running a start-to-finish sequence that includes:

  • Generating Table 1 via sp.mean_comparison(df, ...) and exporting to Word/Excel/LaTeX.
  • Defining an estimand-first plan with sp.causal_question(...).identify().
  • Creating an identification figure using sp.callaway_santanna(...) and plotting with sp.enhanced_event_study_plot(...).
  • Building main regression tables through sp.regress(...) and sp.feols(...), then exporting with rt.to_word(...), rt.to_excel(...), and rt.to_latex().
  • Heterogeneity analysis via a metalearner like sp.metalearner(...) and plotting with sp.cate_plot(...).
  • Robustness analyses using sp.oster_bounds(...), sp.evalue(...), and sp.sensitivity_plot(...) with a reference from sp.honest_did(...).
  • Creating a one-file replication bundle with sp.collect(...) and saving multiple formats.

When to use it

Triggers include keywords like causal inference in python, applied microeconomics pipeline, AER empirical analysis, QJE style robustness, DID IV RD, callaway_santanna, synthetic control, double machine learning, causal forest, event study plot, Oster bound, honest_did, and various decomposition and export tasks. The skill emphasizes an end-to-end pipeline that starts from data contract to replication export.

What it can touch

The workflow relies on the StatSPAI API surface (e.g., sp.mean_comparison, sp.causal_question, sp.callaway_santanna, sp.regress, sp.feols, sp.metalearner, sp.cate_plot, sp.oster_bounds, sp.evalue, sp.sensitivity_plot, sp.collect). It also references optional extras to install such as statspai[fixest], statspai[plotting], statspai[neural], and statspai[text] to enable specific estimator stacks and plotting capabilities. Exports to Word/Excel/LaTeX are performed via methods like .to_word(), .to_excel(), .to_latex(), and sp.collect saves.

Caveats

Install requires extras to enable certain estimators and plotting backends; missing extras raise ImportError (e.g., pyfixest for sp.feols, matplotlib/seaborn for plots, torch for neural causal modules, and text for text-as-treatment features). The description notes that a full pipeline requires the extras to be installed and that the bare pip install statspai is not sufficient for default pipeline functions.

From the SKILL.md

# StatsPAI: Agent-Native Causal Inference & AER-Style Empirical Workflow StatsPAI is a validation-tiered Python package for causal inference and applied econometrics: one `import statspai as sp`, 1,100+ registered functions behind a self-describing API, and mature estimator result objects that commonly export to LaTeX / Word / Excel / BibTeX. This skill drives StatsPAI through the **canonical pipe

More from Auto-Empirical-Research-Skills
All skills →
About this skill
What does the StatsPAI_skill skill do?

Use when the user asks to run a full empirical / causal analysis in Python — by default in the style of an applied economics paper (AER / QJE / JPE / ReStud / AEJ) with DID / RD / IV / SCM / DML / matching, written-out estimating equation + identifying assumption, Table 1 / Table 2 / event-study figure / robustness gauntlet — OR in epidemiology / public health style (target-trial emulation, IPTW + g-formula + TMLE triplet, Mendelian randomization, KM/AFT survival, E-value sensitivity, STROBE/TRIPOD reporting) — OR in ML causal inference style (DML, S/T/X/R/DR meta-learners, causal forest, Drag

How do I install it?

Run `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill 00-Full-empirical-analysis-skill_StatsPAI --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From brycewang-stanford/Auto-Empirical-Research-Skills, a repository with 3,244 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going