Skip to contents

This function tests the hypothesis \(H_{0}: Y_j \perp X\) for \(j=1,\dots,p\) using the block multiplier bootstrap test of Olivares, Olma, and Wilhelm (2025).

Usage

BMB_indep(dat, B, alpha, type = "bmb1", seed = NULL)

Arguments

dat

List with two elements: vector X and matrix Y. The \(j\)-th column in \(Y\) corresponds to \(Y_j\) in the individual hypothesis \(Y_j \perp X\).

B

Numeric. The number of bootstrap samples.

alpha

Numeric. The significance level.

type

Character. This argument specifies whether and how the test statistic and the bootstrap statistic are studentized. Options are "bmb" (no studentization), "bmb1" (default option), and "bmb2" (alternative studentization). The types are formally described in Olivares, Olma, and Wilhelm (2025).

seed

Numeric. The seed for the random number generator. If NULL, the seed is not set. If a positive integer, it sets the seed for reproducibility.

Value

An object of class "BMB_indep", a list containing the following components:

type

Type. See description above

T_obs

The value of the test statistic.

n

Sample Size.

p

Number of hypotheses.

block_size

Block size used in the bootstrap.

B

Number of bootstrap samples.

cv

Bootstrap critical value corresponding to the test statistic.

References

Olivares, M., Olma, T., and Wilhelm, D. (2025). A Powerful Bootstrap Test of Independence in High Dimensions. Preprint, arXiv:2503.21715.

Author

Maurcio Olivares

Tomasz Olma

Daniel Wilhelm

Examples

if (FALSE) {
n <- 100
p <- 10
dat <- list()
dat$X <- rnorm(n)
dat$Y <- MASS::mvrnorm(n = n, mu = rep(0,  p), Sigma=diag(rep(1, p)))
test_indep <- BMB_indep(dat, B=100, alpha=0.05, type = "bmb", seed = 5)
summary(test_indep)

}