
Plot Event Study Coefficients from Multiple Estimators
plot_event_coefs.RdCreates a combined coefficient plot comparing event study estimates from multiple estimators (e.g., TWFE, Sun-Abraham, Callaway-Sant'Anna, Gardner). This is useful for showing robustness of dynamic treatment effects across different estimation strategies.
Usage
plot_event_coefs(
estimates,
reference_period = -1,
conf_level = 0.95,
title = NULL,
xlab = "Periods Relative to Treatment",
ylab = "Estimate"
)Arguments
- estimates
A named list of data frames, each with columns
term(relative time period),estimate, andstd_error. The names of the list become the legend labels.- reference_period
Numeric. The reference period (omitted category). Default is
-1.- conf_level
Numeric. Confidence level for error bars. Default is 0.95.
- title
Character string. Plot title. Default is
NULL.- xlab
Character string. X-axis label. Default is
"Periods Relative to Treatment".- ylab
Character string. Y-axis label. Default is
"Estimate".
Examples
if (FALSE) { # \dontrun{
# After running different estimators:
estimates <- list(
"TWFE" = data.frame(term = -5:5, estimate = rnorm(11), std_error = 0.1),
"Sun-Abraham" = data.frame(term = -5:5, estimate = rnorm(11), std_error = 0.1)
)
plot_event_coefs(estimates)
} # }