Honest sensitivity bounds for parallel-trends violations (HonestDiD)
@misc{honestdid,
title = {HonestDiD},
author = {Rambachan and Roth},
howpublished = {\url{https://github.com/asheshrambachan/HonestDiD}},
note = {Software / documentation}
}Follow the analysis.
Select a node to explore the method
Start from event-study coefficients
Data preparation — shapes the raw inputs into what the estimator expects.
Take β̂ (pre- and post-treatment event-time coefficients) and its covariance Σ from whatever DiD estimator you trust.
es <- fixest::feols(y ~ i(rel_time, ref = -1) | id + period, df)
betahat <- coef(es); sigma <- vcov(es)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Read the pre-trends, don't just test them
A pre-flight check — run this before trusting any estimate downstream.
A failed pre-trends test is low-power and a passed one isn't a green light. Treat the post-period bias δ as something to bound, not assume away.
# post-period coefficient = causal effect + differential trend
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Bound the deviation: relative magnitudes / smoothness
A robustness check — does the headline result survive a different lens?
Restrict δ to a transparent class — no bigger than M̄× the largest pre-period wiggle (relative magnitudes), or boundedly nonlinear (smoothness).
delta_rm <- createSensitivityResults_relativeMagnitudes(
betahat, sigma, numPrePeriods, numPostPeriods, Mbarvec = c(0.5,1,1.5,2))
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Robust confidence set & breakdown value
Uncertainty quantification — standard errors, intervals, and aggregation.
Report the union of confidence intervals over the allowed δ, and the breakdown M̄* — how much trend the conclusion can survive.
robust <- createSensitivityResults_relativeMagnitudes(...)
createSensitivityPlot_relativeMagnitudes(robust, originalResults)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Inputs & data
An event-study: the vector of pre- and post-treatment coefficients and their covariance matrix (from any DiD / event-study estimator).
Show data format & exampleHide example
Format — the event-study coefficient vector betahat and its covariance sigma (e.g. from fixest/did).
library(HonestDiD)
# betahat: pre + post event-time coefficients
# sigma: their covariance matrix; numPrePeriods / numPostPeriods
Figures reproduced from HonestDiD — Rambachan & Roth — unofficial community showcase; all credit to the original authors.
⚠️ Unofficial community showcase of honestdid. Not affiliated with the authors; all credit to them.
Stop betting everything on a pre-trends test. Allow the post-treatment trend to deviate within a transparent class, and report the confidence set — and the breakdown value where the effect would vanish.
Discuss the workflow (2)
Log in to join the discussion.
Replacing the pre-trends test with explicit bounds is the right move. The breakdown M̄* is exactly what referees keep asking me for.
I report the relative-magnitudes set next to the point estimate by default now — it pre-empts the 'but parallel trends' question.
Same. Pairing it with the event-study plot makes the whole argument legible in one figure.