Skip to contents

Estimation

Estimate event-study curves, aggregated ATT, and basic two-way FE DiD.

event_study()
Event study estimation for panel data
att()
ATT aggregation for staggered adoption designs
did()
Basic two-way fixed-effects DiD estimation

Sensitivity analysis

Robust inference under violations of parallel trends.

honest_sensitivity()
Honest sensitivity analysis for parallel-trends violations

Diagnostics

ATT(g,t) extraction and contamination-weight diagnostics for the Sun-Abraham estimator.

att_gt()
Extract the ATT(g,t) table from a Callaway-Sant'Anna result
contamination_weights()
Contamination Weights for TWFE Event-Study Coefficients (Sun-Abraham 2021)

Visualization

Base plot() methods for every result class (static ggplot2; use interactive = TRUE for plotly event-study charts).

plot(<es_result>)
Plot an event-study result
plot(<att_result>) autoplot(<att_result>)
Plot an ATT aggregation result
plot(<att_gt_result>) autoplot(<att_gt_result>)
Plot the ATT(g,t) matrix from a Callaway-Sant'Anna event study
plot(<honest_result>) autoplot(<honest_result>)
Plot a honest sensitivity analysis
plot(<sa_contamination_weights>)
Plot contamination weights as a tile heatmap

S3 methods

broom and ggplot2 integration for result objects.

autoplot(<es_result>)
Autoplot for event-study results
tidy(<es_result>)
Tidy an es_result object
glance.es_result()
Glance at an es_result object
tidy(<did_result>)
Tidy a did_result object
glance.did_result()
Glance at a did_result object
tidy(<att_result>)
Tidy an att_result object
glance.att_result()
Glance at an att_result object

Deprecated

Pre-1.0.0 verb-style API. Fully functional, but new code should use the noun-style successors above.

run_es() deprecated
Deprecated: run an event study
calc_att() deprecated
Deprecated: calculate aggregated ATT
run_did() deprecated
Deprecated: run a basic TWFE DiD model
plot_es() deprecated
Deprecated: plot an event-study result
plot_es_interactive() deprecated
Deprecated: interactive event-study plot
plot_att_gt() deprecated
Deprecated: plot the ATT(g,t) matrix
plot_honest() deprecated
Deprecated: plot a honest sensitivity analysis
compute_contamination_weights() deprecated
Deprecated: compute SA contamination weights
plot_contamination_weights() deprecated
Deprecated: plot contamination weights