mtpvadjust: Adjust p-values for multiple comparisons

View source: R/mtpvadjust.R

mtpvadjustR Documentation

Adjust p-values for multiple comparisons

Description

Given a set of p-values and chosen a C-value, returns a set of adjusted p-values

Usage

mtpvadjust(pv, C)

Arguments

pv

numeric vector of p-values (possibly with NAs). Any other R object is coerced by as.numeric.

C

real numeric value for specifying a multiple procedure.

Details

C=0 indicates that p-values are not adjusted, C=1.22 indicates that p-values are adjusted with Benjamini and Hochberg (1995) ("BH"). The adjusted p-values are called "fdr". When C≥ 1000,p-values are adjusted with the Bonferroni method. C<1.22 indicates that p-values are adjusted by a relaxed BH method while C>1.22, p-values are adjusted by a more strict BH method.

Value

A numeric vector of corrected p-values (of the same length as p, with names copied from p)

Author(s)

Yuan-De Tan
tanyuande@gmaail.com

References

Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57, 289 - 300.
Yuan-De Tan, Hongyan Xu; A general method for accurate estimation of false discovery rates in identification of differentially expressed genes, Bioinformatics, Volume 30, Issue 14, 15 July 2014, Pages 2018 - 2025.

See Also

p.adjust

Examples

set.seed(123)
x <- rnorm(50, mean = c(rep(0, 25), rep(3, 25)))
p <- 2*pnorm(sort(-abs(x)))
p.1.22<-mtpvadjust(pv=p, C=1.22)

NBBttest documentation built on May 30, 2022, 1:05 a.m.