Adaptive Group BenjaminiHochberg Procedure
Description
Performs the Group BenjaminiHochberg procedure using adaptive estimates of the proportions of null pvalues in given groups. The method is applicable when we know some apriori structure about whether certain hypotheses can be grouped. Once the hypotheses are grouped and tested individually, a BenjaminiHochberg correction is performed within each of the groups. Finally, the fact that the BenjaminiHochberg correction controls the FDR at level q*pi0_group within each group (q is the level used in the and pvalue comparison and pi0 is the proportion of null hypotheses within the particular group) is used to increase the power of the procedure. The procedure is described in more detail in the paper "False Discovery Rate Control with Groups" by Hu, Zhao, and Zhou (see references below).
Usage
1  Adaptive.GBH(unadj.p, group.index, alpha = 0.05, method = 'lsl', lambda = 0.5)

Arguments
unadj.p 
A vector of the unadjusted pvalues resulting from a multiple testing experiment. 
group.index 
A vector of the same length as the vector of unadjusted pvalues,
where a "G" in the jth coordinate indicates that the jth unadjusted
pvalues in 
alpha 
The level of that we are attempting to control the FDR at. 
method 
The method for adaptively estimating the proportion of true null
hypotheses within a vector of unadjusted pvalues. The possible
options are "storey", "lsl", and "tst". See the documentation for

lambda 
The value of the tuning parameter for estimating the proportion of null hypotheses, in the "storey" method. 
Value
An object of class GBH
, which provides the adjusted pvalues.
Author(s)
Kris Sankaran
References
Hu, J.X., Zhao, H., and Zhou, H.H. False discovery rate control with groups. Journal of the American Statistical Association, volume 104, number 491. Pages 12151227. 2010.
Sankaran, K and Holmes, S. structSSI: Simultaneous and Selective Inference for Grouped or Hierarchically Structured Data. Journal of Statistical Software, 59(13), 121. 2014. http://jstatsoft.org/v59/i13/
See Also
estimate.pi0
Oracle.GBH
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23  ## These are the unadjusted pvalues corresponding to
## the outcome of some multiple testing experiment. The
## first 500 hypotheses are null and the last 1500 are
## true alternatives.
unadjp < c(runif(500, 0, 0.01), runif(1500, 0, 1))
names(unadjp) < paste("Hyp: ", 1:2000)
## Here there are two groups total we have randomly
## assigned hypotheses to these two groups.
group.index < c(sample(1:2, 2000, replace = TRUE))
# Perform the GBH adjustment.
result < Adaptive.GBH(unadjp, group.index, method = "storey")
# A summary of the GBH adjustment
summary(result)
# The estimated proportions of null hypotheses, between groups
result@pi0
# Visualizing the sorted pvalues, before and after adjustment
plot(result, adjust = TRUE)
plot(result, adjust = FALSE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker. Vote for new features on Trello.