View source: R/panel_event_study.R
| estimate_panel_event_study | R Documentation |
Estimate a panel event study using two-way fixed effects (TWFE) or dynamic TWFE. Returns event-time coefficient estimates suitable for event study plots.
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,
verbose = getOption("eventstudy.verbose", TRUE),
...
)
task |
A |
method |
Estimation method. One of |
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. |
verbose |
Logical; if FALSE, suppress informational messages. Default
|
... |
Additional arguments passed to the underlying estimator
(used by |
The task with results populated, containing:
Tibble of event-time coefficients with std errors
The fitted model object
The estimation method used
Other eventstudy-tasks:
IntradayEventStudyTask,
PanelEventStudyTask,
SyntheticControlTask,
estimate_synthetic_control(),
nonparametric_intraday_test(),
plot_panel_event_study(),
plot_synthetic_control(),
prepare_intraday_event_study(),
sc_placebo_test()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.