supLORD | R Documentation |
Implements the supLORD procedure, which controls both FDX and FDR, including the FDR at stopping times, as presented by Xu and Ramdas (2021).
supLORD(
d,
delta = 0.05,
eps,
r,
eta,
rho,
gammai,
random = TRUE,
display_progress = FALSE,
date.format = "%Y-%m-%d"
)
d |
Either a vector of p-values, or a dataframe with three columns: an identifier (‘id’), date (‘date’) and p-value (‘pval’). If no column of dates is provided, then the p-values are treated as being ordered in sequence, arriving one at a time. |
delta |
The probability at which the FDP exceeds eps (at any time step after making r rejections). Must be between 0 and 1, defaults to 0.05. |
eps |
The upper bound on the FDP. Must be between 0 and 1. |
r |
The threshold of rejections after which the error control begins to apply. Must be a positive integer. |
eta |
Controls the pace at which wealth is spent as a function of the algorithm's current wealth. Must be a positive real number. |
rho |
Controls the length of time before the spending sequence exhausts the wealth earned from a rejection. Must be a positive integer. |
gammai |
Optional vector of |
random |
Logical. If |
display_progress |
Logical. If |
date.format |
Optional string giving the format that is used for dates. |
The function takes as its input either a vector of p-values or a dataframe with three columns: an identifier (‘id’), date (‘date’) and p-value (‘pval’). The case where p-values arrive in batches corresponds to multiple instances of the same date. If no column of dates is provided, then the p-values are treated as being ordered in sequence, arriving one at a time..
The supLORD procedure provably controls the FDX for p-values that are
conditionally superuniform under the null. supLORD also controls the supFDR
and hence the FDR (even at stopping times). Given an overall significance
level \alpha
, we choose a sequence of non-negative non-increasing
numbers \gamma_i
that sum to 1.
supLORD requires the user to specify r, a threshold of rejections after which the error control begins to apply, eps, the upper bound on the false discovery proportion (FDP), and delta, the probability at which the FDP exceeds eps at any time step after making r rejections. As well, the user should specify the variables eta, which controls the pace at which wealth is spent (as a function of the algorithm's current wealth), and rho, which controls the length of time before the spending sequence exhausts the wealth earned from a rejection.
Further details of the supLORD procedure can be found in Xu and Ramdas (2021).
d.out |
A dataframe with the original data |
Xu, Z. and Ramdas, A. (2021). Dynamic Algorithms for Online Multiple Testing. Annual Conference on Mathematical and Scientific Machine Learning, PMLR, 145:955-986.
set.seed(1)
N <- 1000
B <- rbinom(N, 1, 0.5)
Z <- rnorm(N, mean = 3*B)
pval <- pnorm(-Z)
out <- supLORD(pval, eps=0.15, r=30, eta=0.05, rho=30, random=FALSE)
head(out)
sum(out$R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.