Skip to contents

Rambachan-Roth (2023) relative-magnitudes sensitivity for an event-study coefficient. Under \(\Delta^{RM}(\bar M)\) every post-period change in the trend violation is at most \(\bar M\) times the largest change between consecutive pre-periods (the reference period counts as zero), so the violation at the target lies within \(k \bar M m\) of the last pre-period, \(k\) steps later. id_lower / id_upper are that identified set evaluated at the estimated coefficients (equal to HonestDiD's .compute_IDset_DeltaRM); the interval widens it by \(z\) standard errors of the target coefficient, a plug-in band that treats the pre-period changes as known (it is not HonestDiD's conditional / hybrid ARP interval). \(\bar M = 0\) reproduces the conventional CI.

Usage

morie_did_honest_sensitivity(
  event_study,
  m_bar_range = seq(0, 2, 0.5),
  target_time = 0L,
  alpha = 0.05
)

Arguments

event_study

The result of morie_did_event_study (or any list with a coefficients data frame containing relative_time, estimate, std_error).

m_bar_range

Numeric vector of \(\bar M\) values (default seq(0, 2, 0.5)).

target_time

Relative time of the post-treatment coefficient to bound (default 0, the onset period).

alpha

Significance level.

Value

A data frame with columns m_bar, estimate, id_lower, id_upper, ci_lower, ci_upper, covers_zero, plus breakdown_m_bar (the smallest evaluated \(\bar M\) whose interval covers zero) and max_pre_deviation (the largest consecutive pre-period change) attributes.

References

Rambachan, A., & Roth, J. (2023). A more credible approach to parallel trends. Review of Economic Studies, 90(5), 2555–2591.

See also

morie_did_sensitivity_analysis for the 2x2 \(\delta \hat\sigma\) parameterization.

Examples

if (requireNamespace("cobalt", quietly = TRUE)) {
  set.seed(20)
  df <- expand.grid(unit = 1:60, time = 1:8)
  df$treat_time <- ifelse(df$unit <= 30, 5, Inf)
  df$d <- as.integer(df$time >= df$treat_time)
  df$y <- 0.5 * df$time + 1.5 * df$d + rnorm(nrow(df), sd = 0.5)
  es <- morie_did_event_study(df, "y", "unit", "time", "treat_time",
    leads = 3L, lags = 3L
  )
  out <- morie_did_honest_sensitivity(es, m_bar_range = c(0, 1, 5))
  out
}
#>   m_bar estimate id_lower id_upper  ci_lower ci_upper covers_zero
#> 1     0 1.408047 1.408047 1.408047 0.9971091 1.818985       FALSE
#> 2     1 1.408047 1.335330 1.480765 0.9243915 1.891703       FALSE
#> 3     5 1.408047 1.044459 1.771635 0.6335212 2.182573       FALSE