Skip to contents

Computes standard errors and p-values for a SDID estimate using one of four methods, following Clarke et al. (2023): permutation placebo test (Algorithm 4), cluster bootstrap (Algorithm 2), leave-one-out jackknife (Algorithm 3), or (staggered fits only) a global jackknife across the unique control units of all cohorts.

Usage

sdid_inference(
  fit,
  method = c("placebo", "bootstrap", "jackknife", "jackknife_global"),
  n_boot = 200L,
  level = 0.95,
  alternative = c("two.sided", "greater", "less"),
  seed = NULL
)

Arguments

fit

A coresynth object with method = "sdid" (sharp or staggered).

method

Inference method: "placebo" (permutation), "bootstrap", "jackknife", or "jackknife_global" (staggered only).

n_boot

Number of bootstrap replications (only for method = "bootstrap").

level

Confidence level for the interval (all methods).

alternative

Direction of the alternative hypothesis: "two.sided", "greater", or "less".

seed

Integer seed for reproducibility (only for method = "bootstrap").

Value

A list with:

  • estimate: The SDID point estimate.

  • se: Standard error (placebo: placebo-distribution SD, Algorithm 4).

  • p_value: Permutation or normal-approximation p-value.

  • ci_lower, ci_upper: Confidence interval bounds.

  • method: The inference method used.

  • n_controls: Number of control units.

  • alternative: The alternative hypothesis direction.

  • placebo_effects: Named vector of LOO placebo effects (placebo only).

  • boot_ests: Bootstrap estimate distribution (bootstrap only).

Details

For method = "placebo", the p-value is the permutation p-value, while the standard error is the dispersion of the placebo distribution (Clarke et al. 2023, Algorithm 4) and the confidence interval is the normal approximation around the estimate with that SE. The placebo SE assumes the treated unit's noise is comparable to the control units'; interpret it with caution when the donor pool is small.