Thin wrapper over stats::p.adjust(method = "holm");
uniformly more powerful than Bonferroni.
Examples
set.seed(1)
p <- c(runif(30), runif(5, 0, 0.005))
res <- holm(p)
res$n_rejected
#> [1] 1
head(res$adjusted)
#> [1] 1 1 1 1 1 1
# Holm is uniformly more powerful than Bonferroni (rejects at least as
# many), while still controlling the family-wise error rate:
c(holm = holm(p)$n_rejected, bonferroni = bonferroni(p)$n_rejected)
#> holm bonferroni
#> 1 1
# alpha + labels as usual.
holm(c(0.001, 0.01, 0.04), alpha = 0.05,
labels = c("A", "B", "C"))$rejected
#> [1] TRUE TRUE TRUE
