closedSu: Closed Su procedure for simultaneous FDR control

View source: R/cSu_wrapper.R

closedSuR Documentation

Closed Su procedure for simultaneous FDR control

Description

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.

Usage

closedSu(p, set = NULL, alpha = 0.05, approximate = FALSE)

Arguments

p

Numeric vector of p-values, one per hypothesis.

set

Optional subsetting vector for p (logical, positive index, or negative index). If NULL (the default), returns the size of the largest closed-Su-significant set.

alpha

Numeric scalar in [0, 1]. FDR level. Default 0.05.

approximate

Logical. If FALSE (the default), uses an exact algorithm that checks every set size from largest to smallest and is guaranteed to find the largest closed-Su-significant set. If TRUE, uses a faster bisection strategy seeded by the Su lower bound (BH at \alpha/\ell_\alpha). The approximate method may occasionally underestimate the largest significant set, but is recommended for exploratory analyses or large inputs where computation time is a concern.

Details

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.

Value

  • If set is supplied: a single logical (TRUE/FALSE).

  • If set = NULL: a single non-negative integer r (0 = no rejection).

References

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.

See Also

closedBY(), closedeBH()

Examples

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)


eClosure documentation built on April 15, 2026, 5:08 p.m.

Related to closedSu in eClosure...