Learn R Programming

MLGL (version 1.0.0)

selFWER: Selection from hierarchical testing with FWER control

Description

Select groups from hierarchical testing procedure with FWER control (hierarchicalFWER)

Usage

selFWER(out, alpha = 0.05)

Value

a list containing:

toSel

vector of boolean. TRUE if the group is selected

groupId

Names of groups

Arguments

out

output of hierarchicalFWER function

alpha

control level for test

Details

Only outer nodes (rejected groups without rejected children) are returned as TRUE.

References

Meinshausen, Nicolai. "Hierarchical Testing of Variable Importance." Biometrika 95.2 (2008): 265-78.

See Also

hierarchicalFWER

Examples

Run this code
set.seed(42)
X <- simuBlockGaussian(50, 12, 5, 0.7)
y <- X[, c(2, 7, 12)] %*% c(2, 2, -2) + rnorm(50, 0, 0.5)
res <- MLGL(X, y)
test <- hierarchicalFWER(X, y, res$group[[20]], res$var[[20]])
sel <- selFWER(test, alpha = 0.05)

Run the code above in your browser using DataLab