EventStudy R Package

A free, open-source R package for rigorous event study analysis. From simple market models to panel DiD and synthetic control -- everything you need for academic research and industry applications.

15 return models · 12 test statistics · 6 DiD estimators · MIT license

15
Return Models
12
Test Statistics
6
DiD Estimators
Free
& Open Source

Capabilities

Comprehensive Event Study Toolkit

Everything you need to design, execute, and report event studies in R.

15 Expected Return Models

Market Model, Market Adjusted, Mean Adjusted, Fama-French 3/5-Factor, Carhart 4-Factor, GARCH(1,1), EGARCH, GJR-GARCH, and more. Simple and log returns supported.

12 Test Statistics

Parametric and non-parametric tests: t-tests, Patell Z, BMP, Kolari-Pynnonen, Sign Test, Generalized Sign Test, Rank Test, Wilcoxon, and Calendar-Time Portfolio.

Panel Difference-in-Differences

Six DiD estimators for staggered treatment designs: TWFE, Callaway-Sant'Anna, Sun-Abraham, de Chaisemartin-D'Haultfoeuille, Borusyak-Jaravel-Spiess, and Gardner.

Synthetic Control Method

Counterfactual estimation with donor pool optimization and placebo-based inference. Ideal for single-unit case studies.

Power Analysis & Simulation

Monte Carlo simulation to determine the statistical power of your event study design before collecting data. Optimize sample size and event windows.

Publication-Ready Export

Export results as LaTeX tables, styled Excel workbooks, CSV files, and publication-quality plots. Ready for academic papers and reports.

Models

15 Expected Return Models

Choose the expected return model that best fits your research design. All models support both simple and log returns.

ModelDescription
Market ModelOLS regression: R_i = alpha + beta * R_m + epsilon
Market AdjustedAR = R_firm - R_index (zero alpha/unit beta)
Mean AdjustedAR = R_firm - mean(R_firm) over estimation window
Fama-French 3-FactorMarket, SMB, HML factor model
Fama-French 5-FactorFF3 + RMW (profitability) + CMA (investment)
Carhart 4-FactorFF3 + MOM (momentum factor)
GARCH(1,1)Conditional variance with GARCH(1,1) errors
EGARCHExponential GARCH for asymmetric volatility
GJR-GARCHThreshold GARCH capturing leverage effects
Scholes-WilliamsThin-trading adjusted beta estimation
DimsonMulti-period beta for infrequent trading
Comparison Period Mean AdjustedAR based on mean return from comparison period
BHARBuy-and-hold abnormal returns
Abnormal VolumeAbnormal trading volume relative to benchmark
Abnormal VolatilityAbnormal return volatility relative to estimation window

Testing

12 Statistical Tests

Parametric and non-parametric significance tests for single-event and multi-event studies.

TestTypeDescription
AR t-TestSingle-eventStandard t-test on individual abnormal returns
CAR t-TestSingle-eventCumulative abnormal return significance test
BHAR t-TestSingle-eventBuy-and-hold abnormal return significance test
Cross-Sectional t-TestMulti-eventCross-sectional mean test on AARs
Patell Z-TestMulti-eventStandardized residual test (Patell, 1976)
BMP TestMulti-eventBoehmer-Musumeci-Poulsen (1991) robust to event-induced variance
Kolari-Pynnonen TestMulti-eventAdjusted BMP with cross-correlation correction
Sign TestMulti-eventNon-parametric test on sign of abnormal returns
Generalized Sign TestMulti-eventAdjusted sign test accounting for estimation period fraction
Rank TestMulti-eventCorrado (1989) rank-based non-parametric test
Wilcoxon Signed-RankMulti-eventNon-parametric test on magnitude and sign of ARs
Calendar-Time PortfolioMulti-eventCalendar-time portfolio approach (Jaffe, 1974; Mandelker, 1974)

Getting Started

Install in Seconds

Install the EventStudy R package directly from GitHub using devtools.

Installation
# Install from GitHub
devtools::install_github("sipemu/eventstudy")

Example

Run Your First Event Study

A complete example: load data, run a Market Model event study, view the summary, and export results.

Quick Start Example
library(EventStudy)

# Load example data
data(EventStudyData)

# Run a Market Model event study
result <- EventStudy(
  firm_data    = firm_data,
  market_data  = market_data,
  event_list   = event_list,
  return_model = "market_model",
  return_type  = "log",
  est_window   = 250,
  event_window = c(-10, 10)
)

# View summary
summary(result)

# Export to Excel
export_excel(result, file = "event_study_results.xlsx")

# Export LaTeX tables
export_latex(result, file = "tables.tex")

FAQ

Frequently Asked Questions

Is the R package free to use?

Yes. The EventStudy R package is completely free and open source under the MIT license. You can use it for academic research, commercial projects, and teaching without any restrictions.

What R version is required?

The package requires R >= 4.0.0 and depends on standard CRAN packages. It works on Windows, macOS, and Linux.

How does the R package compare to the web app?

The R package offers full programmatic control, reproducible scripts, and access to advanced features like panel DiD, synthetic control, intraday analysis, and power simulation. The web app is ideal for quick interactive analyses without coding.

Can I use it for panel Difference-in-Differences?

Yes. The R package includes 6 DiD estimators for staggered adoption designs: TWFE, Callaway-Sant'Anna, Sun-Abraham, de Chaisemartin-D'Haultfoeuille, Borusyak-Jaravel-Spiess, and Gardner.

Where can I find detailed documentation?

Comprehensive documentation is available on this website under the Docs section. You can also find R function-level help using ?EventStudy in R after installing the package.

Start Your Event Study in R

Install the package from GitHub and run your first analysis in minutes. Full documentation and example datasets included.

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