skills/50-brycewang-aer-skills/skills/aer-identification/SKILL.md
Use when selecting, implementing, or stress-testing the causal identification strategy for an empirical economics manuscript — difference-in-differences (including staggered designs), instrumental variables (including weak-IV-robust inference), regression discontinuity, synthetic control, or shift-share / Bartik. Apply before writing the introduction or results.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research aer-identificationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In AER-track empirical economics, identification is the paper. This skill routes among canonical designs, modern defaults, and referee-facing diagnostics.
If the design is fragile, return to aer-topic-selection; writing cannot save it.
Is treatment assignment plausibly random conditional on observables?
├── Yes, by design (RCT, lottery) → run the RCT analysis; register PAP via AEA RCT Registry
└── No → identification must come from variation
├── Sharp threshold in a running variable → RDD (sharp or fuzzy)
├── Discrete policy change in some units, not others, over time → DiD
│ ├── Single treatment date → canonical 2×2 DiD
│ └── Staggered adoption → Callaway-Sant'Anna or Borusyak-Jaravel-Spiess
├── Endogenous regressor + plausibly exogenous shifter → IV
│ ├── Shifter × pre-existing exposure shares → shift-share / Bartik
│ └── Single instrument → weak-IV-robust inference if F < 50
├── One treated unit / aggregate intervention → synthetic control
└── None of the above → reconsider the question
Use TWFE if and only if:
Otherwise, TWFE produces biased and often sign-flipped estimates.
Do not use TWFE. Use one of:
csdid (Stata), did (R). Identifies group-time average treatment effects (ATT(g,t)); estimands are doubly robust; supports event-study aggregation.did_multiplegt.Required diagnostics:
A flat pre-trend is necessary but not sufficient. Report:
The first-stage F > 10 rule is obsolete. Modern conventions:
Use weakivtest (Stata), ivDiag (R), or the Olea-Pflueger effective F statistic.
The IV's credibility depends on a story, not a test. State the exclusion restriction in one sentence in the introduction and defend it with:
Two valid sources of identification, with very different implications:
Pick one explicitly. Do not hand-wave between the two.
rdrobust.rdplot with the binning method explicitly statedIf the paper uses a field experiment:
A common confusion: identification answers whether X causes Y; mechanism answers why. Mechanism evidence should not weaken the identification of the main effect. Run:
When a StatsPAI MCP server is connected, select the validated tool, then let it
run the estimator — do not hand-roll the design. The methodological choice
still comes from the decision tree above; this table is only the execution
surface. The full registry and chained workflow live in
skills/aer-statspai/SKILL.md.
| Design / diagnostic | Call (StatsPAI) | Do not hand-roll |
|---|---|---|
| Staggered DiD ATT(g,t) | callaway_santanna then aggte | a pooled two-way fixed-effects regression |
| Imputation / dCDH variants | did_imputation, sun_abraham, did_multiplegt | event-study leads and lags assembled by hand on staggered data |
| Forbidden-comparison weight | bacon_decomposition | eyeballing whether TWFE is "probably fine" |
| Pre-trends (joint, not visual) | event_study, pretrends_test | declaring parallel trends from a plot alone |
| IV under weak instruments | ivreg with anderson_rubin_ci, effective_f_test | a first-stage-F-only 2SLS table |
| Shift-share / Bartik | bartik | a Bartik IV with no Rotemberg-weight report |
| RDD (local-linear, RBC) | rdrobust, rdbwselect, rdplot, rddensity | a high-order global-polynomial RDD |
| Synthetic control | synth, augsynth, gsynth, sdid, synth_time_placebo, synth_loo | SCM with no placebo or leave-one-out inference |
| Design / estimator selection | detect_design, preflight, recommend | guessing the estimator before profiling the data |
Bundled with the installed skill, no repository checkout needed --- read it before the repo resources below:
references/estimator-playbook.md --- per-design estimands, modern defaults, diagnostics, and referee-objection response scriptsWhen working from the repo or plugin bundle, load only the relevant resource:
docs/methods-reference.mdtemplates/stata/03_main_did.do, templates/r/03_main_did.R, or templates/python/main_did.pyexamples/aer-exemplars.md and examples/modern-aer-exemplars.mdUse the methods reference before prose: it fixes the estimand, diagnostic, inference method, and citation that the manuscript must report.
Do not advance to robustness or writing until, for the chosen design, all are true:
Write the gate decision before routing onward:
STRATEGY: IV
FIRST STAGE: effective F = 7.8; 2SLS CI is not primary
ROBUST INFERENCE: AR 95% CI = [-0.14, 0.52]
PLACEBO: beta = 0.003 (p = 0.71)
DECISION: advance with directional headline only
STRATEGY: <DiD | IV | RDD | SCM | shift-share | RCT>
MODERN ESTIMATOR USED: <yes / no / which>
REQUIRED DIAGNOSTICS REPORTED: <list>
INFERENCE METHOD: <robust / cluster-robust / AR / wild bootstrap / permutation>
WEAK-IV / TWFE / POLY-ORDER RED FLAGS: <list or "none">
NEXT SKILL: aer-robustness
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.