Eventstudyr
No description available
Install / Use
/learn @JMSLab/EventstudyrREADME
eventstudyr <img src='man/figures/logo.png' align="right" height="139" />
<!-- badges: start --> <!-- badges: end -->Overview
The eventstudyr package implements tools for estimating linear panel event study models, following the recommendations in Freyaldenhoven et al. (2021). Includes sup-t bands, testing for key hypotheses, least wiggly path through the Wald region. Allows instrumental variables estimation following Freyaldenhoven et al. (2019).
Installation
# Install from CRAN
install.packages("eventstudyr")
# Install latest version from GitHub
install.packages("devtools")
devtools::install_github("JMSLab/eventstudyr")
Usage
Find a minimal example below. For more examples see the package documentation and vignette.
library(eventstudyr)
set.seed(10) # for reproducibility of sup-t bands
estimates_ols <- EventStudy(
estimator = "OLS",
data = example_data, # Use package sample data
outcomevar = "y_smooth_m",
policyvar = "z",
idvar = "id",
timevar = "t",
controls = "x_r",
pre = 0, post = 4,
kernel = "fixest"
)
plt <- EventStudyPlot(estimates = estimates_ols)
plt
<img src="man/figures/README-example-1.png" alt="Event-study plot using the example data of the package and default plotting options." />
Citation
Simon Freyaldenhoven, Christian Hansen, Jorge Pérez Pérez, and Jesse M. Shapiro. “Visualization, Identification, and Estimation in the Panel Event-Study Design.” NBER Working Paper No. 29170, August 2021.
Simon Freyaldenhoven, Christian Hansen, Jorge Pérez Pérez, Jesse M.
Shapiro, Veli M. Andirin, Richard Calvo, Santiago Hermo, Nathan Schor,
Emily Wang. “eventstudyr package.” Code and data repository at
https://github.com/JMSLab/eventstudyr, March 2023.
Acknowledgments
Thank you to Eliana Sena Sarmiento and Melissa Wu for their excellent
work testing and reviewing eventstudyr prior to its public release.
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
