| closedSu | R Documentation |
Applies the closed testing improvement of the Su (2018) procedure. The
standard Su procedure controls the false discovery rate (FDR) at level
\alpha under the PRDN assumption but only provides a single set of
rejections. The closed Su procedure provides simultaneous FDR control:
for every set of hypotheses, it determines whether that set can be reported
as discoveries while maintaining FDR control at level \alpha,
regardless of which other sets are inspected.
closedSu(p, set = NULL, alpha = 0.05, approximate = FALSE)
p |
Numeric vector of p-values, one per hypothesis. |
set |
Optional subsetting vector for |
alpha |
Numeric scalar in |
approximate |
Logical. If |
A set R of hypotheses is closed-Su-significant — and therefore a
valid simultaneous rejection — if and only if, for every
1 \le u \le |R| and 0 \le v \le m - |R|, the combined sorted
vector t_1 \ge \cdots \ge t_{u+v} of the u largest p-values
in R and the v largest p-values outside R satisfies
\min_i \left\{ t_i \cdot (u+v) - c \cdot (u+v-i+1) \right\} \le 0,
\quad c = \frac{|R|\alpha}{u \cdot \ell_\alpha},
where \ell_\alpha = -W_{-1}(-\alpha/e) is the Lambert W correction
factor (Xu et al., 2025, Section 6.2).
The function has two modes:
Set-checking mode (when set is supplied): Returns TRUE if the
specified set is closed-Su-significant, and FALSE otherwise.
Discovery mode (when set = NULL): Returns the size r of the
largest closed-Su-significant set consisting of the r smallest
p-values.
If set is supplied: a single logical (TRUE/FALSE).
If set = NULL: a single non-negative integer r (0 = no rejection).
Su, W. J. (2018). The FDR-Linking Theorem. arXiv:1812.08965.
Xu, Z., Solari, A., Fischer, L., de Heide, R., Ramdas, A., & Goeman, J. (2025). Bringing closure to false discovery rate control. arXiv:2509.02517.
closedBY(), closedeBH()
set.seed(42)
p <- c(runif(20), rbeta(10, 0.1, 1))
# Discovery mode
r <- closedSu(p, alpha = 0.05)
# Set-checking mode
closedSu(p, set = p < 0.01, alpha = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.