Description Usage Arguments Details Value References See Also Examples
View source: R/ADDIS-spending.R
Implements the ADDIS algorithm for online FWER control, where ADDIS stands for an ADaptive algorithm that DIScards conservative nulls, as presented by Tian and Ramdas (2019b). The procedure compensates for the power loss of Alpha-spending, by including both adaptivity in the fraction of null hypotheses and the conservativeness of nulls.
1 | ADDIS_spending(d, alpha = 0.05, gammai, lambda = 0.25, tau = 0.5, dep = FALSE)
|
d |
Either a vector of p-values, or a dataframe with three columns: an identifier (‘id’), p-value (‘pval’), and lags (‘lags’). |
alpha |
Overall significance level of the procedure, the default is 0.05. |
gammai |
Optional vector of γ_i. A default is provided with γ_j proportional to 1/j^(1.6). |
lambda |
Optional parameter that sets the threshold for ‘candidate’ hypotheses. Must be between 0 and 1, defaults to 0.25. |
tau |
Optional threshold for hypotheses to be selected for testing. Must be between 0 and 1, defaults to 0.5. |
dep |
Logical. If |
The function takes as its input either a vector of p-values, or a dataframe with three columns: an identifier (‘id’), p-value (‘pval’), and lags, if the dependent version is specified (see below). Given an overall significance level α, ADDIS depends on constants λ and τ, where λ < τ. Here τ \in (0,1) represents the threshold for a hypothesis to be selected for testing: p-values greater than τ are implicitly ‘discarded’ by the procedure, while λ \in (0,1) sets the threshold for a p-value to be a candidate for rejection: ADDIS-spending will never reject a p-value larger than λ. The algorithms also require a sequence of non-negative non-increasing numbers γ_i that sum to 1.
The ADDIS-spending procedure provably controls the FWER in the strong sense for independent p-values. Note that the procedure also controls the generalised familywise error rate (k-FWER) for k > 1 if α is replaced by min(1, kα).
Tian and Ramdas (2019b) also presented a version for handling local
dependence. More precisely, for any t>0 we allow the p-value p_t
to have arbitrary dependence on the previous L_t p-values. The fixed
sequence L_t is referred to as ‘lags’, and is given as the input
lags
for this version of the ADDIS-spending algorithm.
Further details of the ADDIS-spending algorithms can be found in Tian and Ramdas (2019b).
d.out |
A dataframe with the original p-values |
Tian, J. and Ramdas, A. (2019b). Online control of the familywise error rate. arXiv preprint, https://arxiv.org/abs/1910.04900.
ADDIS
provides online control of the FDR.
1 2 3 4 5 6 7 8 9 10 11 12 | 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),
lags = rep(1,15))
ADDIS_spending(sample.df) #independent
ADDIS_spending(sample.df, dep = TRUE) #Locally dependent
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.