Learn R Programming

NBBttest (version 1.0.1)

mtpvadjust: 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.

Value

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

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\ge 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.

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab