What’s New in v0.50.0
Building on the foundation of v0.40.0, this release adds time-varying parameter models, modern DiD estimators, synthetic control methods, and robust inference tools. Here is everything new.
2 New Return Models (15 total)
- Rolling Window Model (
RollingWindowModel) – time-varying \(\alpha\) and \(\beta\) via rolling OLS. Captures structural breaks without parametric assumptions. - DCC-GARCH Model (
DCCGARCHModel) – Dynamic Conditional Correlation GARCH for time-varying beta and volatility. Based on Engle (2002).
# Rolling window with 60-day window
ps <- ParameterSet$new(return_model = RollingWindowModel$new(window_size = 60))
# DCC-GARCH for time-varying correlation
ps <- ParameterSet$new(return_model = DCCGARCHModel$new())Kolari-Pynnönen Test (12 test statistics total)
The new KolariPynnonenTest adjusts the BMP test for cross-sectional correlation caused by event clustering. Essential when multiple events occur on the same calendar date.
ps <- ParameterSet$new(
multi_event_statistics = MultiEventStatisticsSet$new(
tests = list(BMPTest$new(), KolariPynnonenTest$new())
)
)3 New Panel DiD Estimators (6 total)
The panel event study module now includes three modern DiD estimators alongside the existing TWFE and Sun & Abraham methods:
- Callaway & Sant’Anna (2021) – doubly robust group-time ATTs with flexible aggregation. Requires
did. - de Chaisemartin & D’Haultfoeuille (2020) – robust estimation for switchers, handles treatment reversals. Requires
DIDmultiplegt. - Borusyak, Jaravel & Spiess (2024) – efficient imputation estimator for staggered adoption. Requires
didimputation.
result <- estimate_panel_event_study(
panel_task,
method = "callaway_santanna",
leads = 5, lags = 5
)Synthetic Control Methods
A completely new module for single-unit causal inference. Construct a weighted combination of donor units to approximate the treated unit’s counterfactual, then assess significance via placebo tests.
sc_task <- SyntheticControlTask$new(treated, donors, treatment_time = 25)
result <- estimate_synthetic_control(sc_task)
placebo <- sc_placebo_test(result)
plot_synthetic_control(placebo, type = "placebo")Wild Bootstrap Inference
When asymptotic p-values are unreliable (short estimation windows, non-normal residuals, small samples), the wild bootstrap provides more accurate inference:
boot_result <- bootstrap_test(task, B = 1000, type = "rademacher")Multiple Testing Corrections
Control false discovery when testing multiple windows, subgroups, or statistics:
adjusted <- adjust_p_values(p_values, method = "BH") # Benjamini-Hochberg
adjusted <- adjust_p_values(p_values, method = "holm") # Holm (step-down Bonferroni)Power Analysis via Monte Carlo Simulation
Design your study with confidence. Simulate event studies with known effects to estimate detection power:
sim <- simulate_event_study(
n_firms = 30,
n_simulations = 1000,
abnormal_return = 0.01
)
sim$power # e.g., 0.82 = 82% detection rateSummary
| Feature | v0.40.0 | v0.50.0 |
|---|---|---|
| Return models | 13 | 15 |
| Test statistics | 11 | 12 |
| Panel DiD estimators | 3 | 6 |
| Synthetic control | – | New |
| Wild bootstrap | – | New |
| Multiple testing corrections | – | New |
| Power analysis | – | New |
Getting Started
Install from GitHub:
# install.packages("devtools")
devtools::install_github("sipemu/eventstudy")Check the GitHub repository for the latest updates and full documentation.