# Full Empirical Analysis Skill

Classical end-to-end empirical analysis workflow in the traditional Python econometric...

- Repository: https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills (4869 stars)
- Category: Testing
- License: see repository
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill Full-empirical-analysis-skill -g -a claude-code -y`
Codex: `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill Full-empirical-analysis-skill -g -a codex -y`
Cursor: `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill Full-empirical-analysis-skill -g -a cursor -y`
Gemini CLI: `npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill Full-empirical-analysis-skill -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add brycewang-stanford/Auto-Empirical-Research-Skills`

## Description

Classical end-to-end empirical analysis workflow in the traditional Python econometric stack, pandas + numpy + scipy + statsmodels + linearmodels + pyfixest + rdrobust + econml + causalml + matplotlib/seaborn. **Defaults to economics empirical-paper style** (AER / QJE / AEJ), every run produces a publication-ready output set with a multi-column regression table (M1→M6 progressive controls/FE) as the centerpiece, plus Table 1 (descriptives), mechanism / heterogeneity / robustness tables, and event-study + coefficient + trend figures. Covers the full 8-step pipeline an applied economist or quantitative social scientist runs on every paper, (1) data cleaning, (2) variable construction & transformation, (3) descriptive statistics & Table 1, (4) statistical diagnostic tests, (5) baseline empirical modeling, (6) robustness battery, (7) further analysis (mechanism, heterogeneity, mediation, moderation), (8) publication-ready tables & figures. **Also covers two parallel domain modes that share the same 8-step scaffolding**, **Mode A, Epidemiology / public health** (target-trial emulation via `zepid` / hand-rolled `pandas`, IPTW + g-formula + TMLE doubly-robust triplet via `zepid` / `econml` / `lifelines`, Mendelian randomization via `pymr` / `mrtool` (or `rpy2` → `MendelianRandomization`/`TwoSampleMR`), KM / AFT / Cox survival via `lifelines`, E-value sensitivity, principal stratification, STROBE / TRIPOD reporting), and **Mode B, ML causal inference** (DML via `econml.dml` / 

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Full Empirical Analysis, Classical Python Workflow

This skill is the *canonical* 8-step pipeline an applied economist runs on every empirical paper, written in the **traditional Python ecosystem**, no opinionated one-stop wrapper. Every step calls libraries directly (`pandas`, `numpy`, `scipy`, `statsmodels`, `linearmodels`, `pyfixest`, `rdrobust`, `econml`, `causalml`, `matplotlib`, `seaborn`), so the agent, or the user reading the agent's code, has full visibility and can swap any component.

**Companion skill**: if the user prefers a single-import agent-native DSL (`import statspai as sp`), route to `00-StatsPAI_skill` instead. **This skill is the opposite philosophy**: everything explicit, everything inspectable, every diagnostic run by hand, every plot shaped by the user.

## Philosophy

1. **Traditional stack, no magic.** Agents should be able to read every line and know exactly which library / estimator / standard error family is at work.
2. **Full pipeline, not just estimation.** 80% of the time on a real paper is steps 1, 4 and 6, 8. This skill treats them as first-class, not an afterthought.
3. **Rich outputs.** Every step produces at least one table or figure, never a single point estimate in isolation.
4. **Progressive disclosure.** SKILL.md gives the canonical call at each step; `references/` holds variant-specific depth (dozens of tests, estimator-specific diagnostics, plot recipes).
5. **Reproducible.** Every code block is runnable after `pip install -r requirements.txt` and `df = pd.read_csv(...)`.

## SkillOpt-style execution gate

Use this long playbook as a seed skill, not as a script to exhaustively apply. SkillOpt discipline: treat each local analysis-code change as a candidate patch that must beat a selection check and survive a held-out check before it becomes reusable boilerplate. Before writing or revising analysis code, compress the user's request into a task-local `best_skill` card:

The rest: https://github.com/brycewang-stanford/Auto-Empirical-Research-Skills/blob/HEAD/plugins/empirical-analysis-python/skills/pipeline/SKILL.md
