← Back to Data Scientist Mind Map
📈 Data ScientistID: ds-did-parallel-trends-event-study

DiD Parallel Trends & Event Study

双重差分 DID 与平行趋势事件研究
🎯Core Definition
Difference-in-Differences (DiD) & Dynamic Event Study Methods estimate causal treatment effects for non-randomized policy interventions, city-level rollouts, or macro-marketing campaigns; Mathematical formulation: estimating the double difference across groups and time: τ^DiD=(YˉT,post−YˉT,pre)−(YˉC,post−YˉC,pre)\hat{\tau}_{\text{DiD}} = (\bar{Y}_{T, \text{post}} - \bar{Y}_{T, \text{pre}}) - (\bar{Y}_{C, \text{post}} - \bar{Y}_{C, \text{pre}}); estimated via Two-Way Fixed Effects (TWFE) OLS: Yit=α+γTreati+λPostt+β(Treati×Postt)+ϵitY_{it} = \alpha + \gamma \text{Treat}_i + \lambda \text{Post}_t + \beta (\text{Treat}_i \times \text{Post}_t) + \epsilon_{it}, where interaction coefficient β\beta captures the causal treatment effect; Inviolable Assumption: Parallel Trends Assumption (in the absence of treatment, the average path of the treatment group would follow the control group trajectory); verified empirically via Event Study dynamic coefficients (t−kt-k pre-trends must be statistically indistinguishable from zero).
💡Use Cases
City-level policy interventions, national promotional campaign evaluations, and macroeconomic feature rollouts.
⚡Key Problems Solved
Isolates genuine policy lift from macroeconomic seasonality and natural market drift that standard pre/post comparisons conflate.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of DiD Parallel Trends & Event Study.
Use Cases
In production engineering, what are the primary use cases for DiD Parallel Trends & Event Study and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Derive how the OLS interaction coefficient β\beta in TWFE regression models algebraically equals the 4-cell difference-in-differences?
2
How does Event Study regression evaluate dynamic multi-period pre-trends and post-treatment lag effects?
3
Explain the Goodman-Bacon decomposition showing why classical TWFE produces negative weighting errors under staggered rollout timings?
4
Explain how Callaway & Sant'Anna (CS-DiD) estimator fixes staggered treatment heterogeneity using not-yet-treated or never-treated controls?
5
How to remediate non-parallel baseline trends using PSM-DiD or Synthetic Controls?
🔗Foundational Prerequisite Cards (Click to Review)
Updated 2026-08-14
🎯
Verify Mastery: Practice Exam Questions for "DiD Parallel Trends & Event Study"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
← Previous CardRubin Potential Outcomes & DAG d-SeparationNext Card →Synthetic Control Method & Placebo Checks

🔗 More Data Scientist Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/DS/card/ds-did-parallel-trends-event-study
中文速览与面试要点

双重差分 DID 与平行趋势事件研究 (DiD Parallel Trends & Event Study)

定义: 双重差分法 (Difference-in-Differences, DiD / 诺贝尔经济学奖 Card 核心方法) 与事件研究法动态效应检验体系 (DiD Causal Identification & Event Study Dynamic Parallel Trends) 是在宏观政策调整、不可随机化的城市级新功能上线或新法规落地时,评估真实因果净效应的经典计量准则;核心逻辑:通过“两次差分”消除时间趋势与固有群体差异: _ DiD = ( Y_T, post - Y_T, pre) - ( Y_C, post - Y_C, pre);双向固定效应双回归方程:Y_it = + Treat_i + Post_t + ( Treat_i Post_t) + _it(其中交互项系数 精确度量因果效应);命门假设:平行趋势假设 (Parallel Trends Assumption)——即若没有该干预,处理组与对照组的时间变化趋势应完全平行;通过事件研究法 (Event Study: 估计干预前 t-3, t-2, t-1 各期的伪处理效应全为 0) 进行严格证伪检验。 使用场景: 区域性/城市级功能全量发布评估、重大运营政策变革因果效应复盘、宏观营销活动效果测算。 解决的问题: 政策发布前后指标上涨,但无法区分是政策本身的贡献还是大盘自然增长或季节性拉动;DiD 通过对照组的时间差分剔除了所有共同宏观背景趋势。

核心要点

  • 写出双向固定效应 (Two-Way Fixed Effects, TWFE) 回归方程,并严格推导为什么交互项系数 恰好等于四个样本均值的双重差分?
  • 事件研究法 (Event Study Design): 如何通过引入滞后与前置指示变量 _k=-K^M _k ( Treat_i I_t = t_0 + k) 检验事前平行趋势并观察事后动态衰减?
  • 交错双重差分 (Staggered DiD / Goodman-Bacon 分解定理): 为什么当不同城市在不同时间点分批次逐步上线时,标准 TWFE 回归会产生严重的“负权重偏差 (Negative Weights)”?
  • 现代多期交错 DiD 修正估计器:Callaway & Sant'Anna (CS-DiD) 或 Sun & Abraham 估计器如何通过清洁对照组 (Clean Control Groups) 消除异质性偏差?
  • 当平行趋势假设不满足时(如处理组自然增长快于对照组),如何结合倾向得分匹配 (PSM-DiD) 或合成控制法 (Synthetic Control) 进行稳健性补救?