| sdid_inference | R Documentation |
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.
sdid_inference(
fit,
method = c("placebo", "bootstrap", "jackknife", "jackknife_global"),
n_boot = 200L,
level = 0.95,
alternative = c("two.sided", "greater", "less"),
seed = NULL
)
fit |
A |
method |
Inference method: |
n_boot |
Number of bootstrap replications (only for |
level |
Confidence level for the interval (all methods). |
alternative |
Direction of the alternative hypothesis: |
seed |
Integer seed for reproducibility (only for |
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.
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).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.