TopDown TMTI algorithm for estimating a 1-alpha confidence set for the number of false hypotheses among a set.
TopDown_TMTI(
pvals,
subset = NULL,
alpha = 0.05,
gammaList = NULL,
verbose = TRUE,
tau = NULL,
K = NULL,
is.sorted = FALSE,
mc.cores = 1L,
chunksize = 4 * mc.cores,
direction = "binary",
...
)
A 1-alpha lower bound for the number of false hypotheses among the set of supplied p-values
A vector of p-values.
Numeric vector specifying a subset a p-values to estimate a confidence set for the number of false hypotheses for. Defaults to NULL corresponding to estimating a confidence set for the number of false hypotheses in the entire set.
Level in [0,1] at which to generate confidence set. Defaults to 0.05.
List of pre-specified gamma functions. If NULL, the functions will be approximated by bootstrap assuming independence. Defaults to NULL.
Logical, indicating whether or not to write out the progress. Defaults to TRUE.
Numerical (in (0,1)); threshold to use in tTMTI. If set to NULL, then either TMTI (default) or rtTMTI is used.
Integer; Number of smallest p-values to use in rtTMTI. If se to NULL, then either TMTI (default) or tTMTI is used.
Logical, indicating whether the supplied p-values are already is.sorted. Defaults to FALSE.
Number of cores to parallelize onto.
Integer indicating the size of chunks to parallelize. E.g., if setting chunksize = mc.cores, each time a parallel computation is set up, each worker will perform only a single task. If mc.cores > chunksize, some threads will be inactive.
A string indicating whether to perform a binary search ('binary'/'b') or decreasing ('decreasing'/'d') search. Defaults to 'binary', which has better computational complexity.
Additional parameters.
## Simulate some p-values
## The first 10 are from false hypotheses, the next 10 are from true
pvals = c(
rbeta(10, 1, 20), ## Mean value of .05
runif(10)
)
TopDown_TMTI(pvals)
Run the code above in your browser using DataLab