Learn R Programming

FarmTest (version 2.0.1)

farm.fdr: FDR control given a sequence of p-values

Description

Given a sequence of p-values, this function conducts multiple testing and outputs the indices of rejected hypotheses using an adaptive Benjamini-Hochberg procedure proposed by Storey (2002).

Usage

farm.fdr(pValues, alpha = 0.05)

Arguments

pValues

A sequence of p-values, each entry of pValues must be between 0 and 1.

alpha

An optional level for controlling the false discovery rate. The value of alpha must be strictly between 0 and 1. The default value is 0.05.

Value

Indices of tests that are rejected will be returned. It will show "no hypotheses rejected" if none of the tests are rejected.

References

Benjamini, Y. and Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. J. R. Stat. Soc. Ser. B. Stat. Methodol., 57 289<U+2013>300.

Storey, J. D. (2002). A direct approach to false discovery rates. J. R. Stat. Soc. Ser. B. Stat. Methodol., 64, 479<U+2013>498.

See Also

farm.test

Examples

Run this code
# NOT RUN {
set.seed(100)
n = 50
p = 100
X = cbind(matrix(rnorm(n * 10, 1, 1), n, 10), matrix(rnorm(n * (p - 10)), n, p - 10))
pValues = apply(X, 2, function(x) t.test(x)$p.value)
farm.fdr(pValues)
# }

Run the code above in your browser using DataLab