mtpvadjust: P-value Adjustment for Multiple Comparisons

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/mtpvadjust.R

Description

Given a set of N p-values, it returns a set of N p-values adjusted by choosing C-value

Usage

1

Arguments

pv

numeric vector of p-values.

C

numeric constant, the value can be taken from any number > 0 or equal to 0. C is used to choose multiple-test procedure.

Details

This is a multiple-test procedure family including Benjamini-Hochberg procedure, Bonferroni procedure and single-test procedure. By choosing C-value, it can generate a multiple-test procedure for controling the false discovery rate, the expected proportion of false discoveries amongst the rejected hypotheses. Benjamini-Hochberg procedure is given with C=1.22, Bonferroni procedure is given with C = N and single-test procedure can be given with C=0.

Value

return a list of adjusted p-values.

Note

p-value must be ordered from the largest value to the smallest value before executing tan_pvadjust.

Author(s)

Yuan-De Tan tanyuande@gmail.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 and Hongyan Xu A general method for accurate estimation of false discovery rates in identification of differentially expressed genes. Bioinformatics (2014) 30 (14): 2018-2025. doi: 10.1093/bioinformatics/btu124.

See Also

p.adjust

Examples

1
2
3
4
5
6
7
8
9
set.seed(123)
x <- rnorm(50, mean = c(rep(0, 25), rep(3, 25)))
p <- 2*pnorm(sort(-abs(x)))
round(mtpvadjust(pv=p, C=1.22),4)
# [1] 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
#[11] 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 0.6875 0.6174 0.4588
#[21] 0.4115 0.3644 0.2216 0.1554 0.1443 0.1249 0.1027 0.0964 0.0763 0.0319
#[31] 0.0166 0.0135 0.0123 0.0096 0.0091 0.0068 0.0045 0.0041 0.0020 0.0007
#[41] 0.0004 0.0003 0.0002 0.0001 0.0001 0.0001 0.0001 0.0000 0.0000 0.0000

MBttest documentation built on Nov. 8, 2020, 4:57 p.m.