Full-empirical-analysis-skill-Stata
Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem — native Stata + reghdfe + ivreg2 + csdid + did_imputation + eventstudyinteract + sdid + rdrobust + rddensity + synth + synth_runner + psmatch2 + teffects + ebalance + coefplot + esttab + asdoc + binscatter.
Install / Use
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill 00.2-Full-empirical-analysis-skill_StataInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
AutomationSupported Platforms
Tags
Our assessment of Full-empirical-analysis-skill-Stata
Full-empirical-analysis-skill-Stata scores 86/100 on our quality scale, 1782nd of 2,780 Automation skills we index.
Its SKILL.md is 122 KB long, well organised into 84 sections with 68 code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
With 4,360 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so Full-empirical-analysis-skill-Stata is actively maintained.
- Our last check on 2026-11-03 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-29. Automated pattern scan on 2026-09-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
Full-empirical-analysis-skill-Stata compared with similar skills
All 4 of these similar skills score higher than Full-empirical-analysis-skill-Stata; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| Full-empirical-analysis-skill-Stata (this skill)by brycewang-stanford | 86 | 4.4k | 54d ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| rufloby ruvnet | 100 | 81.9k | today | CLAUDE.md |
| Claude-Code-Game-Studiosby Donchitos | 100 | 39.7k | 7d ago | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
Frequently asked questions
- How do I install Full-empirical-analysis-skill-Stata?
- Run
npx skills add brycewang-stanford/Auto-Empirical-Research-Skills --skill Full-empirical-analysis-skill-Stata. The install tabs above show the steps for each supported agent. - Which AI agents does Full-empirical-analysis-skill-Stata work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is Full-empirical-analysis-skill-Stata safe to use?
- Our scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is Full-empirical-analysis-skill-Stata still maintained?
- The repository was last updated about 2 months ago, so Full-empirical-analysis-skill-Stata is actively maintained.
Skill content
View source on GitHubname: Full-empirical-analysis-skill-Stata
description: Classical end-to-end empirical analysis workflow in the traditional Stata ecosystem — native Stata + reghdfe + ivreg2 + csdid + did_imputation + eventstudyinteract + sdid + rdrobust + rddensity + synth + synth_runner + psmatch2 + teffects + ebalance + coefplot + esttab + asdoc + binscatter. 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 Stata pipeline an applied economist runs on every paper — (1) data import & cleaning (use/import, destring, misstable, duplicates, merge assert), (2) variable construction (gen/egen/winsor2/xtile/xtset with L./F./D.), (3) descriptive statistics & Table 1 (tabstat/balancetable/asdoc), (4) classical diagnostic tests (sktest/swilk/hettest/imtest/xtserial/xttest3/vif/dfuller/kpss/hausman/estat overid), (5) baseline modeling (reg/xtreg/reghdfe/ivreg2/ivregress/csdid/did_imputation/eventstudyinteract/sdid/rdrobust/synth/psmatch2/teffects/heckman/qreg/ppmlhdfe), (6) robustness battery (bacondecomp/honestdid/rwolf/ritest/wildbootstrap/oster), (7) further analysis (subgroup/triple-diff/interactions/medsem/marginsplot/binscatter by group), (8) publication-ready tables & figures (esttab/outreg2/estout/coefplot/marginsplot/rdplot/twoway combined). Also covers two parallel domain modes that share the same 8-step scaffolding — Mode A — Epidemiology / public health (target-trial emulation, IPTW + g-formula + TMLE doubly-robust triplet via teffects ipw / teffects ipwra / teffects aipw / eltmle, Mendelian randomization via mrrobust (IVW / Egger / weighted median) and mregger / mrpresso, KM / Cox / AFT / RMST survival via sts / stcox / streg / strmst2, E-value sensitivity via evalue (Linden-Mathur), principal stratification — STROBE / TRIPOD reporting), and Mode B — ML causal inference (DML via ddml / pdslasso, S/T/X/R/DR meta-learners via crforest and ddml interactive, causal forest via crforest / cforest, BART/BCF via bart / bartCause-style externals, CATE distribution + policy tree via crforest, off-policy evaluation, conformal causal externals, fairness audit, DAG learning via pcalg / external Python callouts). Use when the user asks for a complete Stata empirical analysis, wants a reproducible .do-file pipeline, needs a Stata counterpart to the Python StatsPAI / Full-empirical-analysis-skill, or names a specific Stata step in isolation ("run reghdfe with two-way clustering", "csdid event study", "winsor2 at 1%", "esttab to LaTeX", "coefplot with CI", "ivreg2 weak-IV test", "synth_runner placebos", "teffects psmatch balance check"). Mode A triggers on "target trial emulation Stata", "teffects ipw aipw", "eltmle", "mrrobust", "mregger weighted median", "stcox AFT survival", "strmst2", "evalue Stata", "STROBE Stata", "公共健康 Stata", "流行病学 Stata". Mode B triggers on "ddml Stata", "pdslasso", "crforest causal forest Stata", "policy tree Stata", "因果机器学习 Stata".
triggers:
- Stata empirical analysis
- full Stata pipeline
- reproducible do-file
- Stata do-file workflow
- reghdfe two-way FE
- high-dimensional fixed effects Stata
- ivreg2 weak instruments
- ivregress 2sls liml gmm
- csdid Callaway SantAnna
- did_imputation Borusyak
- eventstudyinteract Sun Abraham
- sdid synthetic DID Stata
- rdrobust Stata
- rddensity manipulation test
- synth synthetic control
- synth_runner placebo
- psmatch2 propensity score
- teffects psmatch
- teffects ipwra AIPW Stata
- ebalance entropy balancing
- xtreg fe re hausman
- ppmlhdfe Poisson
- quantile regression qreg
- heckman selection model
- esttab publication table
- outreg2 LaTeX
- estout coefplot
- marginsplot interaction
- rdplot binned scatter
- binscatter Stata
- bacondecomp Goodman Bacon
- honestdid Rambachan Roth
- wild cluster bootstrap boottest
- ritest randomization inference
- rwolf Romano-Wolf
- oster delta
- winsor2 winsorize Stata
- tabstat table 1
- balancetable Stata
- misstable patterns
- destring dates
- xtset panel
Mode A — Epidemiology / public health
- epidemiology pipeline Stata
- public health causal inference Stata
- target trial emulation Stata
- teffects ipw aipw ipwra
- g-formula Stata
- eltmle TMLE Stata
- HAL-TMLE Stata
- Mendelian randomization Stata
- mrrobust mregger
- MR-PRESSO Stata
- MR-Egger weighted median Stata
- STROBE TRIPOD reporting Stata
- evalue sensitivity Stata
- Kaplan-Meier AFT survival Stata
- sts stcox streg strmst2
- 流行病学 Stata
- 公共健康 Stata
Mode B — ML causal inference
- ML causal inference Stata
- ddml double machine learning Stata
- pdslasso ivlasso
- crforest causal forest Stata
- cforest Stata
- meta-learner S T X R DR Stata
- CATE distribution Stata
- policy tree Stata
- off-policy evaluation Stata
- conformal causal Stata
- causal discovery PC Stata
- 因果机器学习 Stata
Full Empirical Analysis — Classical Stata Workflow
This skill is the canonical 8-step pipeline an applied economist runs on every empirical paper, written in the traditional Stata ecosystem — native Stata + the 20+ community commands that have become de-facto standards (reghdfe, ivreg2, csdid, did_imputation, eventstudyinteract, sdid, rdrobust, rddensity, synth, synth_runner, psmatch2, teffects, ebalance, coefplot, esttab, outreg2, boottest, ritest, rwolf, bacondecomp, honestdid, binscatter).
Companion skills: if the user wants the same pipeline in Python, route to 00-StatsPAI_skill (agent-native DSL) or 00.1-Full-empirical-analysis-skill (explicit Python stack). This skill is the Stata counterpart — every step produces a .do file you can hand to a journal's replication office or a co-author who refuses to leave Stata.
Philosophy
- Stata idioms, not Python-translated.
reghdfe, not "statsmodels analogue of reghdfe".esttab, not "Stata's stargazer". - Reproducible .do files. Every code block below is runnable after
use data.dta, clear. No Jupyter, no notebooks — just do-files and log files. - Full pipeline, not just regressions. Stata users historically over-invest in Step 5 (modeling) and under-invest in Steps 1–4 and 6–8. This skill treats them as first-class.
- Rich outputs. Every step yields at least one table (
.tex/.rtf) or figure (.pdf/.png) — never a coefficient printed to the Results window and forgotten. - Progressive disclosure.
SKILL.mdgives the canonical command at each step;references/holds variant-specific depth (dozens of tests, estimator-specific diagnostics, graph recipes).
SkillOpt-style execution gate
Use this long playbook as a seed skill, not as a script to exhaustively apply. SkillOpt discipline: treat each local .do-file 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 a .do file, compress the user's request into a task-local best_skill card:
best_skill: <mode + design + artifact target>
train_signal: <current failure, user goal, or missing evidence>
selection_split: <focal dataset/spec/output used to judge the candidate>
heldout_gate: <checks the patch must pass beyond the focal example>
accepted_patterns: <rules to reuse after validation>
rejected_patterns: <failed shortcuts not to retry without new evidence>
patch_scope: <one estimator/sample/export/robustness change>
reject_if: <conditions that force rollback to the last passing spec>
- Route card: record the mode (
econ,epi, orml-causal), estimand, identification design, focal outcome/treatment, Stata command family, and required artifacts. - Bounded edit: change one decision at a time (sample rule, estimator command, fixed effects, clustering, export format, or robustness check). Prefer the smallest patch that can pass validation.
- Selection split discipline: treat the user's immediate failure or requested artifact as the selection split. Reserve at least one alternate outcome, sample window, estimator command family, or export target as the held-out gate.
- Held-out gate: define checks before running code:
isid/duplicate status, merge assertions, treatment support, missingness thresholds, expected table/figure files, and one non-focal robustness/specification that the change must not break. - Reject buffer: if a candidate spec fails the gate, log the failure,
.dodiff, and gate output inanalysis_log.mdor the Stata log; revert to the last passing spec and do not retry the same unchecked pattern. - Slow/meta update: at the end of the task, write down
accepted_patternsandrejected_patternsfrom the trajectory. Do not widen the canonical.dotemplate from a single passing run. - Promote only after validation: only turn a one-off fix into reusable
.doboilerplate after it passes the current data and at least one alternate outcome/sample/specification.
Three domain modes (default = AER econ; alternates = epi & ML-causal)
The default playbook above is AER-style applied econometrics — the AEA convention: written-out estimating equation, identifying assumption, design horse-race, full robustness gauntlet. The skill also ships two parallel sub-pipelines for the other two big causal-inference traditions, each reusing the same Steps 1–4 (cleaning / construction / Table 1 / diagnostics) and Step 8 (tables/figures) — only Step 5 (estimator) and Step 6/7 swap commands:
| Mode | Reader convention | Step-5 estimator stack | Reporting stack | Jump to |
|---|---|---|---|---|
| Default — Applied Econ (AER / QJE / AEJ) | "Show the equation + identifying assumption + design horse-race; controls visible; clustered SE" | DID / IV / RD / SCM / matching / reghdfe HDFE | AER house-style multi-column esttab / outreg2 / coefplot + 8-section paper layout | Steps 1 → 8 (entire playbook below) |
| Mode A — Epidemiology / Public Health | "STROBE / TRIPOD-AI; target trial protocol; doubly-robust estimand; absolute & relative risk; KM survival" | Target-trial emulation · IPTW (teffects ipw) · IPWRA / AIPW (teffects ipwra / teffects aipw) · g-formula (gformula) · TMLE (eltmle) · Mendelian randomization (mrrobust IVW / mregger / mrpresso) · KM/Cox/AFT (sts/stcox/streg/strmst2) | Same esttab + risk-difference / hazard-ratio / E-value rows | §A. Epidemiology pipeline |
| Mode B — ML Causal Inference | "DML / meta-learners / causal forest / DR-learner; CATE distribution; policy value" | DML (ddml / pdslasso) · S/T/X/R/DR-Learner (ddml interactive) · GRF causal forest (crforest / cforest) · BART / BCF (external Python via python_user) · matrix completion (external) | esttab ML horse-race + crforest CATE plot + policy-value table | §B. ML causal pipeline |
How to invoke a non-default mode (Claude / agent picks this up from the user's wording):
| User says... | Mode the skill switches to |
|---|---|
| "Run a DID / IV / RD / event study", "AER table", "applied micro" | Default (AER econ) — Steps 1 → 8 |
| "Target trial emulation", "g-formula", "IPTW", "TMLE", "Mendelian randomization", "STROBE / TRIPOD", "公共健康 / 流行病学", "epi pipeline", "RWE study", "cohort study", "case-control" | Mode A (Epi) — §A |
| "DML", "double machine learning", "ddml", "causal forest", "crforest", "meta-learner", "CATE", "policy learning", "ML causal", "因果机器学习" | Mode B (ML causal) — §B |
| "Mix" (e.g. "estimate DID + then ML CATE on the heterogeneity") | Default + Mode B in sequence — every estimator stores results via eststo
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
ruflo
81.9k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
Claude-Code-Game-Studios
39.7kTurn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
