skills/66-zheng-siyao-empirical-research-skills/did-reviewer/SKILL.md
双重差分(DID)实证审查Skill。做DID分析前必须检查平行趋势假设、画图可视化、报告违背情况。触发词:DID审查/双重差分检查/平行趋势/DiD reviewer/difference-in-differences
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research did-reviewerInstall 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.
本 Skill 是 DID(双重差分)实证分析的强制检查清单,在执行 DID 分析前和分析后都必须按本 Skill 检查:平行趋势假设、可视化、违背报告、稳健性。不符合本 Skill 要求的 DID 分析不得发表。
DID 是识别因果的"近似实验",但前提是平行趋势假设成立。若该假设不成立,则 DID 估计量是有偏的,无论结果多么"显著"。
常见错误:
| 类型 | 命令 | 说明 |
|------|------|------|
| 标准 DID(2×2) | didYw 或手动回归 | 处理组vs对照组,一次政策 |
| 多时点 DID(Staggered DID) | did2/csdid | 不同单位政策时间不同 |
| 交错 DID(Event Study) | eventstudy | 事件前后动态效应 |
| 连续 DID(Continuous DID) | 断点回归变体 | 政策强度连续变化 |
必须执行:
事件研究图规范:
X轴:相对时间(政策前第k期到政策后第k期)
Y轴:处理效应系数
必须包含:置信区间(95%CI)、政策前期系数连线、政策后期系数
判断标准:
若发现以下违背情况,必须如实报告:
| 违背类型 | 描述 | 处理方式 | |----------|------|----------| | Anticipation Effects | 处理组在政策实施前就提前反应 | 将政策前期效应纳入模型 | | Spillover Effects | 对照组受到处理组溢出效应 | 排除溢出污染样本 | | Composition Effects | 处理组样本在政策后发生变化 | 记录并分析样本变化 | | Parallel Trend Violation | 政策前期趋势不平行 | 改用合成控制法(SCM) |
报告格式:
## 平行趋势违背报告
**检验方法**:[描述使用的检验方法]
**违背情况**:[是/否存在违背]
- 若存在:描述违背类型、程度、可能影响
- 若不存在:说明检验结果
若使用多时点 DID / 交错处理,额外检查:
Callaway & Sant'Anna (2021) 检验:
# 使用 csdid 或 did2 包
csdid(lwage, id, time, gvar, control = "nevertreated")
Borusyak et al. (2024) 检验:
# 使用 did 包
did(yname, tname, idname, gname, xformla = ~X)
判断标准:
必须执行:
| 检验类型 | 做法 | 判断标准 | |----------|------|----------| | 时间安慰剂 | 假设政策提前2-3年 | 政策前期系数应不显著 | | 随机处理组 | 随机抽取处理组 | 显著结果应<5% | | 替换变量 | 用同期不相关变量替代因变量 | 应不显著 |
至少报告以下稳健性检验:
报告处理效应的异质性:
| 异质性维度 | 分组方式 | |------------|----------| | 地区 | 沿海vs内陆 | | 企业规模 | 大vs小 | | 行业 | 高技术vs低技术 | | 时间 | 政策早期vs晚期 |
## DID 实证审查报告
**审查对象**:论文标题/研究问题
**使用的识别策略**:标准DID / 交错DID / 连续DID
**数据来源**:[数据库名称,附provenance]
### 审查结果
| 检查项 | 状态 | 说明 |
|--------|------|------|
| 平行趋势检验 | ✅/❌ | 检验方法和结果 |
| 事件研究图 | ✅/❌ | 是否规范 |
| 违背情况报告 | ✅/❌ | 是否如实报告 |
| 交错DID特殊检验 | ✅/❌ | 使用的方法 |
| 安慰剂检验 | ✅/❌ | 结果是否合理 |
| 稳健性检验 | ✅/❌ | 报告了哪些 |
| 异质性分析 | ✅/❌ | 分析内容 |
### 致命缺陷(如有)
[列出可能导致识别策略失效的致命问题]
### 建议修改
[针对性的修改建议]
在 Claude Code 对话窗口输入:
/did-reviewer
或完整 Prompt:
按DID审查Skill检查本项目的DID分析:必须包含平行趋势检验、事件研究图、违背情况报告、交错DID特殊检验、安慰剂检验、稳健性检验。输出结构化审查报告。
grillme → 选题时确定使用 DID 作为识别策略citation-fidelity → 引用 DID 相关方法论文献时核查准确性econ-reviewer → 完整论文审查时配合使用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.