get_pivotal_stat | R Documentation |
Get a vector of pivotal statistics associated to permutation p-values and to a reference family
get_pivotal_stat(p0, m, t_inv = t_inv_linear, K = nrow(p0))
p0 |
A matrix with B rows. Each row is a vector of null p-values |
m |
The total number of tested hypotheses |
t_inv |
An inverse threshold function (same I/O as 't_inv_linear') |
K |
An integer value in |
A vector of length B
pivotal statitics, whose j-th entry
corresponds to psi(g_j.X)
with notation of the AoS 2020 paper cited
below (section 4.5)
Blanchard, G., Neuvial, P., & Roquain, E. (2020). Post hoc confidence bounds on false positives using reference families. Annals of Statistics, 48(3), 1281-1303.
m <- 50
n <- 45
X <- matrix(rnorm(m*n), ncol = n, nrow = m)
categ <- rbinom(n, 1, 0.4)
B <- 10
null_groups <- replicate(B, sample(categ))
p0 <- rowWelchTests(X, null_groups)$p.value
pivStat <- get_pivotal_stat(p0, m)
quantile(pivStat, 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.