Event Study: Dynamic Effect Estimation and Coefficient Plots
A comprehensive guide to the event study method, covering dynamic effect estimation, coefficient plot construction, normalization, and Leads/Lags settings.
Structure of This Article
- Principles: Model specification of the event study
- Intuition: The economic meaning of dynamic effects
- Code: Complete Stata implementation and standard coefficient plots
Layer 1: Principles
The Event Study Model
- : Leads and lags of the treatment indicator
- : Dynamic treatment effect at period
- The base period (typically ) is omitted, with
Interpreting the Coefficients
- (leads/pre-treatment): Should be close to zero (parallel trends)
- : Immediate effect
- (lags/post-treatment): Lagged effects
Layer 2: Intuition
The event study method answers the question: Do treatment effects vary over time?
In policy evaluation, this is crucial:
- Minimum wage policies may have no short-run effects but reduce employment in the long run
- Environmental regulations may immediately raise costs but gradually generate innovation benefits
The coefficient plot is the standard visualization tool for presenting this dynamic process.
Layer 3: Stata Code
// ═══════════════════════════════════════════════
// Complete Event Study Implementation
// ═══════════════════════════════════════════════
clear all
set seed 98765
local N = 200
local T = 20
local treat_time = 10
set obs `=`N'*`T''
gen id = ceil(_n/`T')
bysort id: gen t = _n
gen treat = (id > `=`N'/2')
// Dynamic treatment effects
gen tau = 0
replace tau = 0.5*(t - `treat_time' + 1) if treat & t >= `treat_time'
gen y = 2 + 0.1*t + tau + rnormal(0, 1)
// Event time
gen rel_time = t - `treat_time'
// Generate dummy variables
tab rel_time if treat, gen(D)
// Omit the base period rel_time = -1
reghdfe y D*, absorb(id t) cluster(id)
coefplot, vertical drop(_cons) ///
yline(0) xline(9.5, lpattern(dash) lcolor(red)) ///
title("Event Study: Dynamic Treatment Effects") ///
xtitle("Relative Period") ytitle("Coefficient Estimate")References
- Sun, L., & Abraham, S. (2021). Estimating Dynamic Treatment Effects in Event Studies with Heterogeneous Treatment Effects. Journal of Econometrics, 225(2), 175-199.
- Borusyak, K., Jaravel, X., & Spiess, J. (2024). Revisiting Event-Study Designs. Review of Economic Studies.
Related reading
- Parallel Trends Assumption: Intuition, Testing, and Visualization
An in-depth understanding of the core assumption of DID—parallel trends. Explains the meaning of the assumption, visualization testing methods, and pre-trend tests, with accompanying Stata code.
DID事件研究图要成立,平行趋势是前提(17 次访问)。 - Staggered DID: TWFE Bias and New Estimators (CS/SA/BJS)
An in-depth explanation of TWFE bias in staggered DID designs, introducing the principles and practical implementation of three new estimators: Callaway-Sant'Anna, Sun-Abraham, and Borusyak-Jaravel-Spiess.
DID多期多组时,事件研究要接到 staggered DID(21 次访问)。 - Classic 2×2 Difference-in-Differences (DID): Model Specification, Estimation, and Inference
A systematic introduction to the classic difference-in-differences method, two-way fixed effects estimation, clustered standard error selection, with complete Stata code.
DID先回到经典 2×2,再看事件研究图(0 次访问)。 - The Intellectual Origins of DID: From the Cholera Map to Causal Inference
Tracing the historical lineage of difference-in-differences—from John Snow's London cholera study in the 19th century to a cornerstone of modern econometrics, and understanding how the core idea of DID was born.
DIDDID 思想从哪来,这篇目前 0 访问。 - How to Understand Interactions of Dummy Variables? How Does This Understanding Map to Difference-in-Differences (DID)?
The general meaning of an interaction term is that the effect of X on Y varies with the value of a third variable M. When M is continuous (e.g., income), the interaction term tells you \"how the marginal effect of X changes at different levels of M.\" But when M is a dummy variable (e.g., gender), the interpretation of the interaction term has a more intuitive and concrete geometric understanding...
Econometrics事件研究的回归写法就是处理组×时间的交互(11 次访问)。