HMT {MLGL} | R Documentation |
Hierarchical Multiple Testing procedure
Description
Apply Hierarchical Multiple Testing procedure on a MLGL
object
Usage
HMT(
res,
X,
y,
control = c("FWER", "FDR"),
alpha = 0.05,
test = partialFtest,
addRoot = FALSE,
Shaffer = FALSE,
...
)
Arguments
res |
|
X |
matrix of size n*p |
y |
vector of size n. |
control |
either "FDR" or "FWER" |
alpha |
control level for testing procedure |
test |
test used in the testing procedure. Default is partialFtest |
addRoot |
If TRUE, add a common root containing all the groups |
Shaffer |
If TRUE, a Shaffer correction is performed (only if control = "FWER") |
... |
extra parameters for selFDR |
Value
a list containing:
- lambdaOpt
lambda values maximizing the number of rejects
- var
A vector containing the index of selected variables for the first
lambdaOpt
value- group
A vector containing the values index of selected groups for the first
lambdaOpt
value- selectedGroups
Selected groups for the first
lambdaOpt
value- indLambdaOpt
indices associated with optimal lambdas
- reject
Selected groups for all lambda values
- alpha
Control level
- test
Test used in the testing procedure
- control
"FDR" or "FWER"
- time
Elapsed time
- hierTest
list containing the output of the testing function for each lambda. Each element can be used with the selFWER or selFDR functions.
- lambda
lambda path
- nGroup
Number of groups before testing
- nSelectedGroup
Numer of groups after testing
See Also
hierarchicalFWER hierarchicalFDR selFWER selFDR
Examples
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)
# perform hierarchical testing with FWER control
out <- HMT(res, X, y, alpha = 0.05)
# test a new value of alpha for a specific lambda
selFWER(out$hierTest[[60]], alpha = 0.1)