Sensitivity of DiD estimate to parallel-trends violations
Source:R/did.R
morie_did_sensitivity_analysis.RdFor each \(\delta\), computes a bias-adjusted confidence set under the bound \(|\mathrm{bias}| \le \delta \hat\sigma\) (Rambachan & Roth, 2023, conservative version).
Usage
morie_did_sensitivity_analysis(
data,
outcome,
treatment,
post,
covariates = NULL,
delta_range = NULL,
cluster = NULL,
alpha = 0.05
)Arguments
- data
A data frame containing the outcome, treatment, post and any covariate columns.
- outcome
Name of the outcome column.
- treatment
Name of the binary (0/1) treatment-group column.
- post
Name of the binary (0/1) post-period column.
- covariates
Optional character vector of covariate column names.
- delta_range
Numeric vector of \(\delta\) values to evaluate (default
seq(0, 2, 0.25)).- cluster
Optional cluster ID column for CR1 standard errors.
- alpha
Significance level for confidence intervals (default 0.05).
Details
For the full Rambachan-Roth fixed-length-confidence-interval (FLCI)
procedure with event-time pre-trends prefer
HonestDiD::createSensitivityResults_relativeMagnitudes on
an event-study coefficient vector.