Consider a family of individual null hypotheses \(H_{0,j}: Y_j \perp X\), for \(j=1,\dots,p\). This function implements a stepwise procedure for selecting those variables from \(Y_1,\dots,Y_p\) that violate independence, while controlling the family-wise error rate.
Arguments
- dat
Data frame. There are two elements in the data frame, X and Y, where X is a random variable and Y corresponds with the \(Y_j\) in the individual hypothesis \(Y_j \perp X\).
- q
Numeric. The block size for the block multiplier bootstrap.
- B
Numeric. The number of bootstrap replications.
- 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.- steps
Logical. If
TRUE
, the function will return the steps of the stepdown procedure. The default isFALSE
.
Value
Returns a list with the total number of rejections. If steps = TRUE
, it will also return the steps of the stepdown procedure.