
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
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)
a vector of p-values obtained from multiple testing
an optional significance level for testing (in decimals). Default is 0.05. Must be in
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).
an optional threshold for estimating the proportion of true null hypotheses
optional, either "smoother" or "bootstrap"; the method for automatically choosing tuning parameter in the estimation of
an optional number of degrees-of-freedom to use when estimating
an optional logical. If TRUE and pi0.method = "smoother",
the indices of rejected hypotheses, along with their corresponding p values, and adjusted p values, ordered from most significant to least significant
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
The "mBH" procedure is simply the regular Benjamini-Hochberg pocedure, but in the rejection threshold the denominator
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<U+2013>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<U+2013>498.
# NOT RUN {
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")
# }
Run the code above in your browser using DataLab