After running an event study, you need to extract and export results
for analysis, tables, and publication. This vignette covers all the ways
to get results out of an EventStudyTask.
First, let’s set up a complete event study (using synthetic data for reproducibility):
The tidy.EventStudyTask() method returns results in
broom-compatible long format, making it easy to use with standard
tidyverse workflows.
After extracting CARs, you can analyze what drives the cross-sectional variation:
# Extract CARs for all events
all_cars <- purrr::map2_dfr(
task$data_tbl$event_id,
task$data_tbl$firm_symbol,
function(eid, sym) {
car <- task$get_car(event_id = eid)
tibble::tibble(
event_id = eid,
firm_symbol = sym,
car_total = tail(car$car, 1)
)
}
)
# Now you can regress CARs on firm characteristics
# (see the cross_sectional_regression() function)| Method | Returns | Format |
|---|---|---|
get_ar() |
AR for one event | tibble |
get_car() |
CAR for one event | tibble |
get_aar() |
AAR/CAAR for one group | tibble |
get_model_stats() |
Model fit stats | list |
tidy.EventStudyTask() |
Broom-compatible results | tibble |
export_results() |
Write to file | CSV/XLSX/LaTeX |
plot_event_study() |
Visualization | ggplot2 |