This Skill is amandatory checklistfor DID (difference-in-differences) empirical analysis. Before and after conducting DID analysis, you must check according to this Skill: parallel trends assumption, visualization, violation reporting, robustness.DID analyses that do not meet the requirements of this Skill must not be published.
Applicable Scenarios
- Designing a testing plan before conducting DID analysis
- Used when reviewers examine DID papers
- Used when researchers self-check DID empirical results
- Used when evaluating the quality of published DID papers
Core Concept
DID is an "approximate experiment" for identifying causality, but the premise is that the parallel trends assumption holds. If this assumption does not hold, then the DID estimator is biased, no matter how "significant" the results are.
Common Mistakes:
- ❌ Reporting only the coefficients for the treatment group and control group, without testing parallel trends
- ❌ Parallel trends test plots without confidence intervals
- ❌ Not reporting violations due to effects occurring before the policy (anticipation effects)
- ❌ Treating DID as a master key, ignoring identification assumptions
Mandatory Checklist (DID Seven-Step Review)
✅ Step One: Confirm the Type of Research Design
| Type | Command | Description |
|---|---|---|
| Standard DID (2×2) | didYw or manual regression |
Treatment group vs control group, one policy |
| Staggered DID | did2/csdid |
Different units have different policy times |
| Staggered DID (Event Study) | eventstudy |
Dynamic effects before and after the event |
| Continuous DID | Regression discontinuity variant | Continuous variation in policy intensity |
✅ Step Two: Parallel Trends Test (Pre-trend Test)
Must be executed:
- Calculate the mean outcome variable in the pre-policy period for the treatment group and control group
- Testpre-policy periodwhether the trends of the two groups are parallel
- Use Event Study Plot for visualization
Event Study Plot Specifications:
X轴:相对时间(政策前第k期到政策后第k期)
Y轴:处理效应系数
必须包含:置信区间(95%CI)、政策前期系数连线、政策后期系数
Judgment Criteria:
- Pre-policy period (k<0) coefficientsnot significantly different from 0 → parallel trends hold ✅
- Pre-policy period coefficientssignificantly different from 0 → parallel trends violated ❌
✅ Step Three: Report Violations (Violation Report)
If the following violations are found, you mustreport truthfully:
| Violation Type | Description | Handling Method |
|---|---|---|
| Anticipation Effects | The treatment group reacts in advance before policy implementation | Incorporate pre-policy effects into the model |
| Spillover Effects | The control group is affected by spillover effects from the treatment group | Exclude samples contaminated by spillovers |
| Composition Effects | The treatment group sample changes after the policy | Record and analyze sample changes |
| Parallel Trend Violation | Pre-policy trends are not parallel | Switch to the synthetic control method (SCM) |
Report format:
## 平行趋势违背报告
**检验方法**:[描述使用的检验方法]
**违背情况**:[是/否存在违背]
- 若存在:描述违背类型、程度、可能影响
- 若不存在:说明检验结果
✅ Step 4: Staggered DID Special Tests
If usingmulti-period DID / staggered treatment, additionally check:
Callaway & Sant'Anna (2021) test:
# 使用 csdid 或 did2 包
csdid(lwage, id, time, gvar, control = "nevertreated")
Borusyak et al. (2024) test:
# 使用 did 包
did(yname, tname, idname, gname, xformla = ~X)
Judgment criteria:
- Whether the effects differ across treatment timing (heterogeneity)
- Whether there is "good/bad" treatment timing confounding
✅ Step 5: Placebo Test
Must be performed:
| Test type | Method | Judgment criteria |
|---|---|---|
| Time placebo | Assume the policy is advanced by 2-3 years | Pre-policy coefficients should be insignificant |
| Random treatment group | Randomly draw treatment groups | Significant results should be <5% |
| Replace variables | Replace the dependent variable with an unrelated variable from the same period | Should be insignificant |
✅ Step 6: Robustness Checks
Report at least the following robustness checks:
- Exclude outliers: remove extreme values before and after the policy in the treatment group
- Different control groups: replace the definition of the control group
- Different model specifications: add or remove control variables, change the functional form
- Sample sensitivity: consistency of results across different sample scopes
✅ Step 7: Heterogeneity Analysis (optional but recommended)
Report heterogeneity in treatment effects:
| Heterogeneity dimension | Grouping method |
|---|---|
| Region | Coastal vs inland |
| Firm size | Large vs small |
| Industry | High-tech vs low-tech |
| Time | Early vs late policy period |
Output standard format
## DID 实证审查报告
**审查对象**:论文标题/研究问题
**使用的识别策略**:标准DID / 交错DID / 连续DID
**数据来源**:[数据库名称,附provenance]
### 审查结果
| 检查项 | 状态 | 说明 |
|--------|------|------|
| 平行趋势检验 | ✅/❌ | 检验方法和结果 |
| 事件研究图 | ✅/❌ | 是否规范 |
| 违背情况报告 | ✅/❌ | 是否如实报告 |
| 交错DID特殊检验 | ✅/❌ | 使用的方法 |
| 安慰剂检验 | ✅/❌ | 结果是否合理 |
| 稳健性检验 | ✅/❌ | 报告了哪些 |
| 异质性分析 | ✅/❌ | 分析内容 |
### 致命缺陷(如有)
[列出可能导致识别策略失效的致命问题]
### 建议修改
[针对性的修改建议]
Call the interface
Enter in the Claude Code chat window:
/did-reviewer
Or the full Prompt:
按DID审查Skill检查本项目的DID分析:必须包含平行趋势检验、事件研究图、违背情况报告、交错DID特殊检验、安慰剂检验、稳健性检验。输出结构化审查报告。
Coordination with other Skills
grillme→ determine to use DID as the identification strategy when selecting a topiccitation-fidelity→ verify accuracy when citing DID-related methodological literatureecon-reviewer→ use together during full paper review
Important Statement
- The review standards of this Skill refer to the requirements of **top journals (AER, Econometrica, QJE, JPE)**
- The parallel trends test is a necessary condition, not an option
- Finding a violation does not mean the paper is invalid, but it must bereported truthfully, and reviewers will judge whether to accept it