Skip to contents

Step-down Holm with Sidak's closed-form adjustment per step; equivalent to mutoss::SidakSD when that package is installed.

Usage

holm_sidak(p_values, alpha = 0.05, labels = NULL)

Arguments

p_values

Numeric vector of raw p-values.

alpha

Significance level.

labels

Optional character vector of test labels.

Value

An object of class "morie_multiple_testing_result".

Examples

set.seed(1)
p <- c(runif(30), runif(5, 0, 0.005))

res <- holm_sidak(p)
res$n_rejected
#> [1] 1
head(res$adjusted)          # monotone (step-down enforced)
#> [1] 0.9991726 0.9999093 0.9999933 0.9999975 0.9971386 0.9999975

# Step-down Holm with a Sidak (rather than Bonferroni) per-step bound;
# marginally more powerful than plain Holm under independence.
c(holm_sidak = holm_sidak(p)$n_rejected, holm = holm(p)$n_rejected)
#> holm_sidak       holm 
#>          1          1 

holm_sidak(c(0.001, 0.01, 0.04), labels = c("A", "B", "C"))$rejected
#> [1] TRUE TRUE TRUE