Estimate a panel event study using two-way fixed effects (TWFE) or dynamic TWFE. Returns event-time coefficient estimates suitable for event study plots.
Usage
estimate_panel_event_study(
task,
method = c("static_twfe", "dynamic_twfe", "sun_abraham", "callaway_santanna",
"dechaisemartin_dhaultfoeuille", "borusyak_jaravel_spiess"),
leads = 5,
lags = 5,
base_period = -1,
cluster = NULL,
...
)Arguments
- task
A
PanelEventStudyTask.- method
Estimation method. One of
"static_twfe","dynamic_twfe", or"sun_abraham".- leads
Number of pre-treatment periods to include. Default 5.
- lags
Number of post-treatment periods to include. Default 5.
- base_period
The reference period (relative to treatment) to omit. Default -1 (the period just before treatment).
- cluster
Name of the clustering variable for standard errors. Defaults to the unit ID.
- ...
Additional arguments passed to the underlying estimator (used by
callaway_santanna,dechaisemartin_dhaultfoeuille, andborusyak_jaravel_spiessmethods).