sumStats | R Documentation |
This function uses generic permutation statistics to determine confidence bounds for the number of true discoveries, the true discovery proportion and the false discovery proportion within a set of interest. The bounds are simultaneous over all sets, and remain valid under post-hoc selection.
sumStats(G, S = NULL, alternative = "greater", alpha = 0.05,
truncFrom = NULL, truncTo = NULL, nMax = 50)
G |
numeric matrix of statistics, where columns correspond to variables, and rows to data transformations (e.g. permutations). The first transformation is the identity. |
S |
vector of indices for the variables of interest (if not specified, all variables). |
alternative |
direction of the alternative hypothesis ( |
alpha |
significance level. |
truncFrom |
truncation parameter: values less extreme than |
truncTo |
truncation parameter: truncated values are set to |
nMax |
maximum number of iterations. |
Truncation parameters should be such that truncTo
is not more extreme than truncFrom
.
The significance level alpha
should be in the interval [1/B
, 1), where
B
is the number of data transformations (rows in G
).
sumStats
returns an object of class sumObj
, containing
total
: total number of variables (columns in G
)
size
: size of S
alpha
: significance level
TD
: lower (1-alpha
)-confidence bound for the number of true discoveries in S
maxTD
: maximum value of TD
that could be found under convergence of the algorithm
iterations
: number of iterations of the algorithm
Anna Vesely.
Goeman J. J. and Solari A. (2011). Multiple testing for exploratory research. Statistical Science, doi: 10.1214/11-STS356.
Vesely A., Finos L., and Goeman J. J. (2023). Permutation-based true discovery guarantee by sum tests. Journal of the Royal Statistical Society, Series B (Statistical Methodology), doi: 10.1093/jrsssb/qkad019.
True discovery guarantee using p-values: sumPvals
Access a sumObj
object: discoveries
, tdp
, fdp
# generate matrix of t-scores for 5 variables and 10 permutations
G <- simData(prop = 0.6, m = 5, B = 10, alpha = 0.4, p = FALSE, seed = 42)
# subset of interest (variables 1 and 2)
S <- c(1,2)
# create object of class sumObj
res <- sumStats(G, S, alpha = 0.4, truncFrom = 0.7, truncTo = 0)
res
summary(res)
# lower confidence bound for the number of true discoveries in S
discoveries(res)
# lower confidence bound for the true discovery proportion in S
tdp(res)
# upper confidence bound for the false discovery proportion in S
fdp(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.