hierarchicalFWER: Hierachical testing with FWER control

Description Usage Arguments Details Value References See Also Examples

View source: R/hierarchicalFWER.R

Description

Apply hierarchical test for each hierarchy, and test external variables for FWER control at level alpha

Usage

1
hierarchicalFWER(X, y, group, var, test = partialFtest, Shaffer = FALSE)

Arguments

X

original data

y

associated response

group

vector with index of groups. group[i] contains the index of the group of the variable var[i].

var

vector whith the variables contained in each group. group[i] contains the index of the group of the variable var[i].

test

function for testing the nullity of a group of coefficients in linear regression. 3 parameters : X : design matrix, y response and varToTest : vector of variables to test; return a pvalue

Shaffer

boolean, if TRUE, a shaffer correction is performed

Details

Version of the hierarchical testing procedure of Meinshausen for HCgglasso output. You can use th selFWER function to select groups at a desired level alph

Value

a list containing :

pvalues

pvalues of the different test (without correction)

adjPvalues

adjusted pvalues

groupId

Index of the group

hierMatrix

Matrix describing the hierarchical tree.

References

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

See Also

selFWER, hierarchicalFDR

Examples

1
2
3
4
5
set.seed(42)
X = simuBlockGaussian(50,12,5,0.7)
y = drop(X[,c(2,7,12)]%*%c(2,2,-2)+rnorm(50,0,0.5))
res = HCgglasso(X,y)
test = hierarchicalFWER(X, y, res$group[[20]], res$var[[20]])

HCgglasso documentation built on May 2, 2019, 4:54 p.m.