View source: R/combined_bound.R
| combined_bound | R Documentation |
Computes, from one-sided Gaussian test statistics, lower confidence bounds on the number of true discoveries that hold simultaneously for every selection of hypotheses, including selections made after looking at the data.
combined_bound(z = NULL, p = NULL, alpha = 0.05, block_size = 1,
equal_blocks = FALSE)
## S3 method for class 'combined_bound'
print(x, ...)
## S3 method for class 'combined_bound'
summary(object, ...)
z |
numeric vector of test statistics, one per hypothesis. Large values are evidence against the null hypothesis. Names, if present, are used as hypothesis labels. |
p |
numeric vector of one-sided p-values, as an alternative to
|
alpha |
error level; the bounds hold simultaneously with probability at
least |
block_size |
largest number of statistics in a block of dependent statistics. The default 1 means that all statistics are independent. See Details. |
equal_blocks |
logical; set to |
x, object |
a result of |
... |
not used. |
Statistic z_i follows a Gaussian distribution with mean \theta_i
and variance 1, and hypothesis i has the null hypothesis
H_i: \theta_i \le 0. A selected hypothesis is a true discovery when
\theta_i > 0 and a false discovery otherwise. The statistics must be
independent, or, when block_size = b > 1, fall into independent blocks
of at most b statistics with any dependence inside a block. The
procedure needs only b, not the blocks themselves.
With probability at least 1 - alpha, every selection S of the
hypotheses contains at least the reported number of true discoveries, for all
selections at once. Selections may therefore be chosen after looking at the
data, and several selections may be reported together.
The bound N on the number of false discoveries among all hypotheses is
the smallest of the following component bounds, each computed at level
alpha/4:
the number of statistics below the Sidak cutoff
\Phi^{-1}\{(1 - \alpha/4)^{1/m}\} (the Bonferroni cutoff
\Phi^{-1}\{1 - \alpha/(4m)\} when block_size > 1);
closed testing with the largest p-value as local test;
two bounds from the numbers of statistics above a grid of thresholds,
with Bernstein and with Chernoff tolerances, and a bound from a centered
statistic that gathers many weak signals; these three share one union
bound at level alpha/4.
For a selection S, the bound on the false discoveries in S is the
smallest of |S|, N rounded down, the number of hypotheses in
S below the cutoff, and a reference family bound at level
alpha/4 that counts the p-values of S above a grid of levels
q = 2^{-1}, 2^{-2}, \ldots. The bound on true discoveries is |S|
minus this number.
When many hypotheses carry weak signals, the threshold counts and the centered statistic can make the bound on the number of false discoveries much smaller than the Sidak bound and the bound of closed testing with Simes local tests.
An object of class "combined_bound", a list with components
m |
number of hypotheses. |
alpha, block_size, equal_blocks |
the arguments. |
z, p_value |
statistics and one-sided p-values. |
labels |
hypothesis labels, or |
components |
named vector of the component bounds on the number of false
discoveries among all hypotheses ( |
bound |
the combined bound |
false_all |
the bound on false discoveries among all hypotheses,
|
z_cutoff |
the cutoff for individual significance. |
significant |
logical vector; |
call |
the call. |
Use true_discoveries, ranked_bounds,
hypothesis_table and select_by_fdp to read the
bounds, and plot to draw them.
Goeman, J. J. and Solari, A. (2011). Multiple testing for exploratory research. Statistical Science, 26, 584–597. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/11-STS356")}
Blanchard, G., Neuvial, P. and Roquain, E. (2020). Post hoc confidence bounds on false positives using reference families. The Annals of Statistics, 48, 1281–1303. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/19-AOS1847")}
Sidak, Z. (1967). Rectangular confidence regions for the means of multivariate normal distributions. Journal of the American Statistical Association, 62, 626–633. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/01621459.1967.10482935")}
true_discoveries, ranked_bounds,
hypothesis_table, select_by_fdp,
plot.combined_bound
## 2000 hypotheses, 300 of them with a weak signal
set.seed(1)
z <- rnorm(2000, mean = c(rep(2, 300), rep(0, 1700)))
fit <- combined_bound(z)
fit
summary(fit)
## the same data given as one-sided p-values
fit_p <- combined_bound(p = pnorm(z, lower.tail = FALSE))
fit_p$false_all == fit$false_all
## dialysis facilities: mortality below 1.2 times the national rate
se <- (log(dialysis$upper) - log(dialysis$lower)) / (2 * qnorm(0.975))
z <- (log(1.2 * 22.2) - log(dialysis$mortality)) / se
fit <- combined_bound(z)
fit
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.