Back to Blog
R PackageRelease

EventStudy R Package v0.40.0: 13 Models, Panel DiD, and More

Dr. Simon Muller

A Major Leap Forward

EventStudy v0.40.0 is a major release of the open-source R package for conducting event studies in financial economics. It expands the package from 3 return models to 13, adds 11 test statistics, and introduces entirely new modules for panel event studies, intraday analysis, and publication-ready export -- covering the full lifecycle of event study research from data preparation to LaTeX tables.

We are excited to announce EventStudy v0.40.0, a comprehensive overhaul of the R package. This release transforms the package from a focused tool with three return models into a full-featured event study platform with 13 return models, 11 test statistics, and entirely new capabilities including panel event studies, intraday analysis, and publication-ready export.

Version 0.40.0 represents a 4x expansion in expected return model coverage, growing from 3 models to 13, and adds 11 test statistics where previously none were included. According to MacKinlay (1997), the choice of expected return model and test statistic can materially affect the power of an event study, making this breadth of options essential for rigorous research across diverse market settings.

What's New

13 Return Models

Beyond the original Market Model, Mean Adjusted, and Market Adjusted models, v0.40.0 adds:

  • Fama-French 3-Factor Model -- size and value factors
  • Fama-French 5-Factor Model -- adds profitability and investment
  • Carhart 4-Factor Model -- adds momentum
  • GARCH(1,1) -- time-varying volatility
  • BHAR -- buy-and-hold abnormal returns for long-horizon studies
  • Volume Model -- abnormal trading volume
  • Volatility Model -- abnormal return volatility
  • Custom & Linear Factor Models -- extensible base classes

11 Test Statistics

The test statistics suite now includes both parametric and non-parametric tests:

  • AR T-Test, CAR T-Test, BHAR T-Test
  • Cross-Sectional T-Test
  • Patell Z Test
  • BMP Test (Boehmer, Musumeci & Poulsen 1991)
  • Sign Test and Generalized Sign Test
  • Rank Test (Corrado 1989)
  • Calendar-Time Portfolio Test

Panel Event Studies (Difference-in-Differences)

A completely new module for panel event studies, following the framework described by Miller (2023) in the Journal of Economic Perspectives:

  • Static TWFE -- two-way fixed effects estimator
  • Dynamic TWFE -- leads and lags for pre-trend testing
  • Sun & Abraham (2021) -- interaction-weighted estimator for staggered treatment
  • Cluster-robust standard errors via sandwich::vcovCL()

Intraday Event Studies

New IntradayEventStudyTask class supports POSIXct timestamps for minute-level or second-level analysis, with a non-parametric significance test based on Rinaudo & Saha (2014).

Cross-Sectional Analysis

Regress CARs on firm characteristics with cross_sectional_regression(), featuring HC-robust standard errors via the sandwich package. Also includes car_by_group() for subgroup comparisons and car_quantiles() for distributional analysis.

Diagnostics & Validation

New diagnostic tools ensure your results are robust:

  • validate_task() -- check data quality before analysis
  • model_diagnostics() -- Shapiro-Wilk, Durbin-Watson, Ljung-Box tests
  • pretrend_test() -- test for pre-event abnormal returns
  • plot_diagnostics() -- visual diagnostic charts

Publication-Ready Export

Export your results to multiple formats:

  • CSV -- for further analysis in any tool
  • Excel -- multi-sheet workbook with formatted tables
  • LaTeX -- publication-ready tables with significance stars
  • Broom -- tidy() method for tidyverse workflows

Quick Example

The new run_event_study() convenience wrapper makes it easy to get started:

Quick Event Study Example
library(EventStudy)

# Create task from data
task <- EventStudyTask$new(firm_data, index_data, request)

# Run event study with default settings (Market Model)
ps <- ParameterSet$new()
task <- run_event_study(task, ps)

# View results
task$summary()
plot_event_study(task, type = "caar")
Return Model
A statistical model used to estimate expected returns during the estimation window. The 13 models in v0.40.0 range from simple (Mean Adjusted) to advanced (GARCH, Fama-French 5-Factor).
Test Statistic
A numerical measure for testing whether abnormal returns are significantly different from zero. The 11 tests cover parametric (t-test, Patell Z, BMP) and non-parametric (Sign, Rank) approaches.
Panel Event Study
A difference-in-differences framework applied to event study data, using unit and time fixed effects to estimate treatment effects while controlling for unobserved heterogeneity.

Getting Started

Install the package from GitHub:

Installation
# install.packages("devtools")
devtools::install_github("sipemu/eventstudy")

CRAN submission is underway. Check the GitHub repository for the latest updates and full documentation.

Get the latest R package

Install the newest version from GitHub to access all the features described above.


Learn More

We use cookies for analytics to improve this site. See our Privacy Policy.