mtCorrectV: Perform multiple testing correction on a vector of p-values

View source: R/multiple_testing.R

mtCorrectVR Documentation

Perform multiple testing correction on a vector of p-values

Description

This function performs multiple testing correction on a vector of p-values.

Usage

mtCorrectV(
  pvals,
  mtMethod = c("BY", "holm", "hochberg", "hommel", "bonferroni", "BH", "fdr", "none"),
  mtStat = c("identity", "median", "mean", "max", "min"),
  nComp = length(pvals)
)

Arguments

pvals

A numeric vector.

mtMethod

Multiple testing correction method. Choices are 'BY' (default) 'holm', hochberg', hommel', 'bonferroni', 'BH', 'fdr' and 'none'.

mtStat

A statistics to be optionally computed. Choices are 'identity' (no statistics will be computed and the adjusted p-values will be returned as such), 'median', 'mean', 'max' and 'min'.

nComp

Number of comparisons. In most situations, this parameter should not be changed.

Value

If mtStat is 'identity' (as default), a numeric vector of p-values corrected for multiple testing. Otherwise, a statistic based on these corrected p-values defined by mtStat.

Examples

pvals <- c(0.032, 0.001, 0.0045, 0.051, 0.048)
mtCorrectV(pvals)


LISTO documentation built on April 25, 2026, 5:06 p.m.