dyadic: Create a complete dyadic tree structure

dyadicR Documentation

Create a complete dyadic tree structure

Description

Produce a set of regions with forest structure, with a single tree, which is dyadic.

Usage

dyadic.from.leaf_list(leaf_list, method)

dyadic.from.window.size(m, s, method)

dyadic.from.height(m, H = NULL, method)

Arguments

leaf_list

A list of vectors representing the atoms of the forest structure. See V.star() for more information.

method

A numeric value. If method == 1, start from the leaves and group nodes of a same height 2 by 2 as long as possible (note that this can introduce gaps). If method==2, start from the root and divide nodes in 2 nodes of equal size as long as possible

m

An integer value, the number of hypotheses to have in the structure

s

An integer value, the number of elements in each atom/leaf

H

An integer value, the desired maximal height of the tree. If NULL (by default), use floor(2 + log2(m - 1)) which gives the maximum achievable height given m.

Details

dyadic.from.leaf_list

Dyadic tree structure from a given list of atoms/leafs

dyadic.from.window.size

Dyadic tree structure from window size: the number of elements in each atom/leaf is set to s

dyadic.from.height

Dyadic tree structure from height: the total height of the tree is set to H

Value

A list with two named elements:

leaf_list

A list of vectors representing the atoms of the forest structure. See V.star() for more information.

C

A list of list representing the forest structure. See V.star() for more information.

References

Durand, G., Blanchard, G., Neuvial, P., & Roquain, E. (2020). Post hoc false positive control for structured hypotheses. Scandinavian Journal of Statistics, 47(4), 1114-1148.

Durand G. (2025). A fast algorithm to compute a curve of confidence upper bounds for the False Discovery Proportion using a reference family with a forest structure. arXiv:2502.03849.

Examples

m <- 6
dd <- dyadic.from.window.size(m, s = 2, method = 2)
str(dd)

dd <- dyadic.from.height(m, H = 3, method = 2)
str(dd)

dd <- dyadic.from.height(m, method = 2)
str(dd)

leaf_list <- dd$leaf_list
dd <- dyadic.from.leaf_list(leaf_list, method = 2)
str(dd)

pneuvial/sanssouci documentation built on July 4, 2025, 3:16 p.m.