farm.FDR: Control FDR given a list of pvalues

Description Usage Arguments Details Value References Examples

Description

Given a list of p-values, this function conducts multiple testing and outputs the indices of the rejected hypothesis. Uses an adaptive Benjamini-Hochberg (BH) procedure where the proportion of true nulls π_0 is estimated. This estimation is done based on the pi0est function in the qvalue package. See Storey(2015).

Usage

1
2
3
farm.FDR(pvalue, alpha = NULL, type = c("mBH", "BH"), lambda = seq(0.05,
  0.95, 0.05), pi0.method = c("smoother", "bootstrap"), smooth.df = 3,
  smooth.log.pi0 = FALSE)

Arguments

pvalue

a vector of p-values obtained from multiple testing

alpha

an optional significance level for testing (in decimals). Default is 0.05. Must be in (0,1).

type

an optional character string specifying the type of test. The default is the modified BH procedure (type = "mBH"). The usual BH procedure is also available (type = "BH"). See Benjamini and Hochberg (1995).

lambda

an optional threshold for estimating the proportion of true null hypotheses π_0. Must be in [0,1).

pi0.method

optional, either "smoother" or "bootstrap"; the method for automatically choosing tuning parameter in the estimation of π_0, the proportion of true null hypotheses.

smooth.df

an optional number of degrees-of-freedom to use when estimating π_0 with a smoother.

smooth.log.pi0

an optional TRUE/FALSE. If TRUE and pi0.method = "smoother", π_0 will be estimated by applying a smoother to a scatterplot of \log(π_0) estimates against the tuning parameter lambda. Default is FALSE.

Details

The "mBH" procedure is simply the regular Benjamini-Hochberg pocedure, but in the rejection threshold the denominator p is replaced by π_0 * p. This is a less conservative approach. See Storey (2002).

Value

rejected

the indices of rejected hypotheses, along with their corresponding p values, and adjusted p values, ordered from most significant to least significant

alldata

all the indices of the tested hypotheses, along with their corresponding p values, adjusted p values, and a column with 1 if declared siginificant and 0 if not

significant

The number of hypotheses rejected

References

Benjamini, Y. and Hochberg, Y. (1995). "Controlling the False Discovery Rate: A Practical and PowerfulApproach to Multiple Testing." Journal of the Royal Statistical Society B, 51, 289–300.

Storey, J.D. (2015). "qvalue: Q-value estimation for false discovery rate control. R package version 2.8.0, https://github.com/jdstorey/qvalue.

Storey, J.D. (2002). " Direct Approach to False Discovery Rates." Journal of the Royal Statistical Society B, 64(3), 479–498.

Examples

1
2
3
4
5
set.seed(100)
Y = matrix(rnorm(1000, 0, 1),10)
pval = apply(Y, 1, function(x) t.test(x)$p.value)
farm.FDR(pval, 0.05)
farm.FDR(pval, 0.01, type = "BH")

kbose28/farmtest documentation built on May 29, 2019, 3:01 a.m.