Anyone who has done DID is no stranger to parallel-trends tests. And a parallel-trends test is one special application of the event study method. Recently my advisor had me read and study the paper An Introductory Guide to Event Study Models. The authors also published a YouTube video series.
This post records my own reflections based on that paper’s framework. I haven’t looked closely at the code yet, so for now I’ll put down my understanding of the statistical theory.
How does economics study event shocks?
Event studies study whether a specific event affected the object of study. This method was first applied in finance — for example, analyzing the impact of company renamings, corporate scandals, and information disclosures on stock price movements.1
Of course, this method calls for more rigorous statistical analysis — Zhihu, for instance, is constantly full of questions like this:
After a policy was implemented or a product launched, Apple’s or Nvidia’s stock evaporated or surged by tens of billions the next day — what’s the reason?
That kind of analysis is the starting point of event studies, but the statistical test still needs to be more rigorous.
Introduced into econometrics, event studies are mainly used to study dynamic treatment effects. By slicing the treatment effect into time groups, we can further discuss the impact of an event.
For example, in the figure below studying the effect of unemployment on income,2 dynamic time dummies are built from each person’s unemployment timing: one year before unemployment (t-1), one year after (t+1), two years after (t+2). These include anticipatory trends and post-event trends.
Earnings losses of displaced workers
Pre-event trends: For example, if everyone expects a wave of unemployment to come, you can see a slow decline before the event arrives, but the shock is still clearly visible right around the moment the event hits (where the x-axis is 0).
Post-event trends: After the shock passes, the effect starts to rebound. That is, compare whether the effect strengthens or weakens year by year after the shock.
Model assumptions: The parallel-trends test in DID is also an event study. It verifies that the policy satisfies the model assumption — an exogenous shock. So before the policy starts, the treatment effect should be insignificant with a coefficient close to 0, and after it starts, the coefficient should be significantly different from 0.
Take the paper on English listening exams and educational inequality3 as an example.
The time dummy it sets is when the English listening section was added to the gaokao.
Dependent variables: English scores, math and Chinese scores, and admission rates.
Heterogeneity groups: urban and rural samples.
The figure also shows that before English listening was introduced, the urban-rural gap was small, and after its introduction the gap kept widening.English listening exams and educational inequality
The “countless” little details of event studies
The regression specification
In econometrics, an event study estimates dynamic treatment effects — it slices the regression over time.
Taking panel data as an example, the distinctive feature is adding event-time dummies $D_{i, t-j}$ .
An introductory guide to event study models4 gives two classification criteria:
Is there a sample group that “never received treatment”?
Do different sample groups have substantially different event dates for treatment?
Grouping
No “never-treated” sample
Has a “never-treated” sample
Same event date
N/A
DID-type
Different event dates
Timing-based
Hybrid
TL;DR —
N/A: no control group, so the treatment effect can’t be estimated at all.
DiD-type: a perfect controlled experiment — the traditional DID.
Timing-based: everyone is in the treated group, but the event shocks differ across units, so a comparison can still be made.
Take a panel-data study on relocation for poverty alleviation as an example.5 Renmin University’s relocation database has long run surveys at relocation resettlement sites, so their study is actually an ITT — all samples are treated units that went through the relocation policy.
But! Relocation was carried out in batches — some people moved out earlier, some later. So in the same year, there is both a treated group that already moved and a control group that hasn’t, which means the study can still be done.
By the way, the paper’s conclusion is that once living conditions improve, migrant workers no longer want to leave home. Hence the paper’s title, Home Sweet Home.
Hybrid: has both a comparison between treated and control groups and a comparison within the treated group in the same year.
Choosing the event time
The overall logic of the event study method is:
Choose the event and when it occurs, choose the base period for the event, choose the window (the range of dynamic treatment effects), choose the treated and control groups, and compute and decompose the average treatment effect.
Choosing the event date
Even if a policy is rolled out nationwide at a specific time, markets may react in advance; moreover, most of the time the shock is uneven, spreading out gradually by group, by carrier, by time, and by space. But in applied statistics you just work with what you have and pick the best option available.
Take the study of Facebook’s effect on college students’ mental health as an example.6 When each person started using Facebook is obviously hard data to get, so the study matches individual mental-health questionnaires to the timing of when Facebook rolled out on each campus, and runs the regression with that.
By the way, the finding: social media use worsened college students’ mental health. A channel test shows it was driven by comparison anxiety.
Handling the base period
A quick refresher on dummy variables in econometrics:
To avoid collinearity, use n-1 dummy variables to estimate the relative gaps among n variables.
For example, compare air-pollution levels across the spring-summer-autumn-winter cycle.
Estimating such treatment effects requires a base period for comparison.
We can default to spring as the base period,
so the estimated coefficients for summer, autumn, and winter are all results compared against spring’s data.
The time dummies in event studies also need a base period, hence the following choices or treatments:
Absolute base period: usually choose the period right before the event (the contrast works better and highlights the jump): it reflects long-run gaps, used when there are many pre-event periods.
Relative base period: use the previous period as the base: used when focusing on anticipatory effects, or when there are few pre-event periods.
Merging periods: to handle collinearity. For example, merge t-6 and earlier into one period, and t+5 and later into one period, or drop a certain period.
Base-period treatment: normalize it, set it to 0……
Time trends: whether to add time trends, individual fixed effects, and time fixed effects.
Event endpoints: the endpoints may be shifted and look ugly, or may reflect the event’s trend.
An introductory guide to event study models notes that since the choice of event dummies can affect the results, one should strengthen the description of how the dummies are set and restricted.
But in the top-5 papers I’ve read recently, event studies seem mainly used to visually display heterogeneity and the model’s exogenous-shock assumption. So this part is usually glossed over — they just say how the dummies were set, without stressing why.
Choosing the window
Choosing the window is essentially a balance between prettier results and statistical bias.
Too short, and the statistics are biased; too long, and the counterfactual estimate isn’t efficient enough.
From a pragmatic standpoint 🤪 — it’s best to let the regression show a clear trend.
A symmetric pre- and post-event window is best.
You can go further with fitting — for example, first estimate the dynamics by month, then weight by season to bring out a trend. Weighted fitting across multiple events works the same way.A quadratic weighted fit, better at showing a trend
Choosing the treated and control groups
Exclude special samples. With Chinese city data, for instance, we usually drop municipalities directly under the central government because they’re too special! And in the heterogeneity section, we usually look at the difference between provincial capitals and non-capital cities.
Pay attention to the parallel-trends test. That is, before the shock, the treated and control groups should look as similar as possible.
Add control variables.
Weighted matching. For example, synthetic control and propensity score matching.
If an event study has a Hybrid data structure, you can choose to drop the never-treated group’s data.
The authors also recommend standardizing the coefficients.
An interesting question: what’s the difference between control variables and propensity matching? In my view, one is a back-door control, estimating through the causal path; the other is a front-door control, strengthening the comparison by matching samples.
The problem of trend contamination
Trend decomposition is too complicated to fully understand, so I’ll just talk about it in broad strokes.
Two aspects of trends need to be considered:
If individual and time trends aren’t controlled for, the treatment-effect estimate will be biased.
The treatment effect itself also changes over time and needs to be decomposed.Some example trend changes from the paper’s exposition
A parallel-trends plot I drew once; it barely passes, but you can see an obvious pre-trend, so it’s a bit less convincing
In some cases, because event time, calendar time, and individual fixed effects are multicollinear, you can’t handle linear trends — unless you estimate them as nonlinear.
I do have strong feelings about estimating trends. There are actually some clever ways to decompose them — see Lifecycle and Wage Decomposition. The economic analysis there is very elegant. Even when individual, time, and event time are collinear, they can still be separated through theory. Of course, this only works for specific settings; it’s not a general statistical method.
You can set one period to 0 and then discuss nonlinear trends.
Some specific endogeneity. Some policies, for example, are rolled out over time. In that case the effect for later-treated units may look larger than for earlier-treated ones. But it might just be that units develop over time. So when building survey databases, many people also add fixed effects for the survey-entry batch.
Add interactions between time trends and individual dummies.
For Timing-based data, it’s suggested to include quadratic trend variables to avoid collinearity.
Add a time trend. Time fixed effects decompose the intercept; time-trend estimation decomposes the slope.
The left panel has no time trend; the right panel adds one — this contrast is the logic of difference-in-differences. Source: the authors’ YouTube video
Inference for event studies
Clustering tests for autocorrelation. Cluster at whichever level the autocorrelation lives.
Interact the time dummies with the size of the event.
I feel this is similar to the shift-share instrumental variable (shift-IV). It uses the group trend net of the individual, multiplied by the individual’s size, as the instrument.
Multiple events per unit
Weight them, or restrict to a single one — count only the largest event or the first occurrence.
Handling heterogeneity
Interactions, or grouping by time — for example, earlier-affected and later-affected groups.
Estimate further through the counterfactual. Because event studies can be biased when fixed effects and trends aren’t estimated, the paper uses an estimation technique to make it more accurate (I didn’t understand this part).
Because event studies can be biased when fixed effects and trends aren’t estimated, the paper uses an estimation technique to make it more accurate (I didn’t understand this part).
Considering non-year event time
For example, cohort effects. This is really just custom grouping of time dummies.
This fits perfectly with my stereotype of finance research relentlessly mining information factors. ↩︎
Jacobson L S, LaLonde R J, Sullivan D G. Earnings losses of displaced workers[J]. The American economic review, 1993: 685-709. ↩︎
Li H, Meng L, Mu K, et al. English language requirement and educational inequality: Evidence from 16 million college applicants in China[J]. Journal of Development Economics, 2024: 103271. ↩︎
Miller D L. An introductory guide to event study models[J]. Journal of Economic Perspectives, 2023, 37(2): 203-230. ↩︎
Qiu H, Hong J, Wang X, et al. Home sweet home: Impacts of living conditions on worker migration with evidence from randomized resettlement in China[J]. Journal of Economic Behavior & Organization, 2024, 220: 558-583. ↩︎
Braghieri L, Levy R, Makarin A. Social media and mental health[J]. American Economic Review, 2022, 112(11): 3660-3693. ↩︎