Skip to contents

Thin wrapper over stats::p.adjust(method = "hommel").

Usage

hommel(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 <- hommel(p)
res$n_rejected
#> [1] 1
head(res$adjusted)
#> [1] 0.9919061 0.9919061 0.9919061 0.9919061 0.9919061 0.9919061

# Hommel is the most powerful of the stats::p.adjust FWER methods
# (>= Hochberg), at higher computational cost.
c(hommel = hommel(p)$n_rejected, hochberg = hochberg(p)$n_rejected)
#>   hommel hochberg 
#>        1        1 

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