DIDEvent Study

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.

作者:Econometrics Research Navigation Station发布:2025-03-15★★★

Structure of This Article

  1. Principles: Model specification of the event study
  2. Intuition: The economic meaning of dynamic effects
  3. Code: Complete Stata implementation and standard coefficient plots

Layer 1: Principles

The Event Study Model

Yit=αi+λt+k=KLβkDi,tk+Xitγ+εitY_{it} = \alpha_i + \lambda_t + \sum_{k=-K}^{L} \beta_k \cdot D_{i,t-k} + X_{it}'\gamma + \varepsilon_{it}
  • Di,tkD_{i,t-k}: Leads and lags of the treatment indicator
  • βk\beta_k: Dynamic treatment effect at period kk
  • The base period (typically k=1k = -1) is omitted, with β1=0\beta_{-1} = 0

Interpreting the Coefficients

  • k<0k < 0 (leads/pre-treatment): Should be close to zero (parallel trends)
  • k=0k = 0: Immediate effect
  • k>0k > 0 (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.

关联代码文件