BatchStBH {onlineFDR} | R Documentation |
Implements the BatchSt-BH algorithm for online FDR control, as presented by Zrnic et al. (2020). This algorithm makes one modification to the original Storey-BH algorithm (Storey 2002), by adding 1 to the numerator of the null proportion estimate for more stable results.
BatchStBH(d, alpha = 0.05, gammai, lambda = 0.5, display_progress = FALSE)
d |
A dataframe with three columns: identifiers (‘id’), batch numbers (‘batch’) and p-values (‘pval’). |
alpha |
Overall significance level of the FDR procedure, the default is 0.05. |
gammai |
Optional vector of γ_i. A default is provided with γ_j proportional to 1/j^(1.6). |
lambda |
Threshold for Storey-BH, must be between 0 and 1. Defaults to 0.5. |
display_progress |
Logical. If |
The function takes as its input a dataframe with three columns: identifiers (‘id’), batch numbers (‘batch’) and p-values (‘pval’).
The BatchSt-BH algorithm controls the FDR when the p-values in a batch are independent, and independent across batches. Given an overall significance level α, we choose a sequence of non-negative numbers γ_i such that they sum to 1. The algorithm runs the Storey Benjamini-Hochberg procedure on each batch, where the values of the adjusted significance thresholds α_{t+1} depend on the number of previous discoveries.
Further details of the BatchSt-BH algorithm can be found in Zrnic et al. (2020).
out |
A dataframe with the original data |
Storey, J.D. (2002). A direct approach to false discovery rates. J. R. Statist. Soc. B: 64, Part 3, 479-498.
Zrnic, T., Jiang D., Ramdas A. and Jordan M. (2020). The Power of Batching in Multiple Hypothesis Testing. International Conference on Artificial Intelligence and Statistics: 3806-3815
sample.df <- data.frame( id = c('A15432', 'B90969', 'C18705', 'B49731', 'E99902', 'C38292', 'A30619', 'D46627', 'E29198', 'A41418', 'D51456', 'C88669', 'E03673', 'A63155', 'B66033'), pval = c(2.90e-08, 0.06743, 0.01514, 0.08174, 0.00171, 3.60e-05, 0.79149, 0.27201, 0.28295, 7.59e-08, 0.69274, 0.30443, 0.00136, 0.72342, 0.54757), batch = c(rep(1,5), rep(2,6), rep(3,4))) BatchStBH(sample.df)