
Hierarchical (serial gatekeeping) Bonferroni procedure
Source:R/multiple_testing.R
hierarchical_bonferroni.RdFamilies are tested in order; if a family produces no rejections, subsequent families are blocked from testing. rmorie-specific stage-list return shape; no drop-in CRAN equivalent (gMCP covers the concept but with a different graphical API).
Arguments
- p_values_by_family
List of numeric vectors, one per family.
- alpha
Overall FWER level.
- propagate_alpha
Not implemented. Alpha recycling between families would need a named procedure; what runs instead is that every family is tested at the full alpha and the gate closes on the first family with no rejection. Passing this argument explicitly warns, and
alpha_propagatedin the result isFALSE. Ignored; kept so the signature is stable across families (mirrors the Python reference).
Value
A morie_rich_result list with one stage entry per
family and an overall_rejected logical vector.
Examples
res <- hierarchical_bonferroni(list(c(0.4, 0.5), c(0.001, 0.002)))
str(res)
#> List of 10
#> $ title : chr "Hierarchical Bonferroni Gatekeeping"
#> $ call : chr "families=2, alpha=0.0500"
#> $ summary_lines :List of 4
#> ..$ Families : int 2
#> ..$ alpha : num 0.05
#> ..$ Total rejected: int 0
#> ..$ Gate closed : logi TRUE
#> $ warnings : chr(0)
#> $ interpretation : chr "Serial gatekeeping across 2 famil(ies) with alpha=0.0500 yielded 0 total rejection(s). A downstream gate was cl"| __truncated__
#> $ stages :List of 2
#> ..$ :List of 6
#> .. ..$ family : int 1
#> .. ..$ n_tests : int 2
#> .. ..$ alpha_used: num 0.05
#> .. ..$ n_rejected: int 0
#> .. ..$ adjusted_p: num [1:2] 0.8 1
#> .. ..$ rejected : logi [1:2] FALSE FALSE
#> ..$ :List of 6
#> .. ..$ family : int 2
#> .. ..$ n_tests : int 2
#> .. ..$ alpha_used: num 0
#> .. ..$ n_rejected: int 0
#> .. ..$ adjusted_p: num [1:2] 1 1
#> .. ..$ rejected : logi [1:2] FALSE FALSE
#> $ overall_rejected: logi [1:4] FALSE FALSE FALSE FALSE
#> $ method : chr "hierarchical_bonferroni"
#> $ alpha : num 0.05
#> $ alpha_propagated: logi FALSE
#> - attr(*, "class")= chr [1:3] "morie_multiple_testing_result" "morie_rich_result" "list"