event-study

Run event studies and DiD analyses with robust estimators in R.

34|10|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/dariia-m/my_claude_skills --skill event-study
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: event-study
Source: https://github.com/dariia-m/my_claude_skills/tree/main/event-studies
Command: npx skills add https://github.com/dariia-m/my_claude_skills --skill event-study

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fixest, did, did2s, DIDmultiplegt, bacondecomp, HonestDiD, ggplot2, broom, dplyr, stringr, modelsummary, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive toolkit for conducting event studies and difference-in-differences (DiD) analyses, enabling you to estimate dynamic treatment effects and diagnose potential issues in panel data.

Core Features & Use Cases

  • Event Study Plots: Generate publication-quality plots showing treatment effects over time relative to an event.
  • Robust DiD Estimators: Implement modern methods (Callaway & Sant'Anna, Sun & Abraham, etc.) that handle staggered treatment timing and heterogeneous effects.
  • Diagnostics: Perform pre-trend tests, placebo checks, and sensitivity analyses to validate your findings.
  • Use Case: Analyze the impact of a new policy rolled out across different regions at different times, visualizing the dynamic effects and ensuring the parallel trends assumption holds.

Quick Start

Use the event-study skill to create an event study plot for the 'outcome' variable using 'treat_year' as the treatment timing and 'unit_id' and 'year' for panel structure.

Frequently Asked Questions about event-study

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a difference-in-differences analysis with staggered treatment timing in R?▼

To run a difference-in-differences analysis with staggered timing in R, use modern robust estimators like Callaway & Sant'Anna or Sun & Abraham, which handle heterogeneous treatment effects better than traditional TWFE models.

What is the best way to create an event study plot for panel data?▼

The best way to create an event study plot for panel data is using R packages like fixest and ggplot2 to visualize dynamic treatment effects over time relative to the treatment event.

How do I test for pre-trends in a DiD analysis?▼

To test for pre-trends in a DiD analysis, perform pre-trend testing and placebo checks using built-in diagnostics to validate that the parallel trends assumption holds before interpreting treatment effects.

Does this event study approach support sensitivity analysis for treatment effects?▼

Yes, this event study approach supports sensitivity analysis for treatment effects by utilizing the HonestDiD R package alongside standard robust estimators to check the stability of your findings.

When should I use Callaway & Sant'Anna instead of standard TWFE models for an event study?▼

You should use Callaway & Sant'Anna instead of standard TWFE models for an event study when your treatment timing is staggered, as it avoids negative weighting issues caused by heterogeneous effects.