# hierarchicalFDR: Hierarchical testing with FDR control In MLGL: Multi-Layer Group-Lasso

 hierarchicalFDR R Documentation

## Hierarchical testing with FDR control

### Description

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

### Usage

```hierarchicalFDR(X, y, group, var, test = partialFtest, addRoot = 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 with 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. The function has 3 arguments: `X`, the design matrix, `y`, response, and `varToTest`, a vector containing the indices of the variables to test. The function returns a p-value `addRoot` If TRUE, add a common root containing all the groups

### Details

Version of the hierarchical testing procedure of Yekutieli for MLGL output. You can use th selFDR function to select groups at a desired level alpha.

### Value

a list containing:

pvalues

pvalues of the different test (without correction)

groupId

Index of the group

hierMatrix

Matrix describing the hierarchical tree.

### References

Yekutieli, Daniel. "Hierarchical False Discovery Rate-Controlling Methodology." Journal of the American Statistical Association 103.481 (2008): 309-16.

selFDR, hierarchicalFWER

### 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)
test <- hierarchicalFDR(X, y, res\$group[], res\$var[])
```

MLGL documentation built on May 25, 2022, 5:05 p.m.
{"ft_lang_label":"__label__en","ft_lang_prob":0.6061789,"math_prob":0.6682152,"size":1482,"snap":"2022-27-2022-33","text_gpt3_token_len":398,"char_repetition_ratio":0.1556157,"word_repetition_ratio":0.07079646,"special_character_ratio":0.2631579,"punctuation_ratio":0.16428572,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9684234,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-13T09:44:30Z\",\"WARC-Record-ID\":\"<urn:uuid:b5b6cb16-5cb5-47f0-b9e1-9b3a1506c327>\",\"Content-Length\":\"35953\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:dd01a769-f81f-42c5-9068-75201ad2d379>\",\"WARC-Concurrent-To\":\"<urn:uuid:f109ec4f-7842-4537-98fd-03eb6b188801>\",\"WARC-IP-Address\":\"51.81.83.12\",\"WARC-Target-URI\":\"https://rdrr.io/cran/MLGL/man/hierarchicalFDR.html\",\"WARC-Payload-Digest\":\"sha1:WBPIUET3YLDNTQPHNPNLN6J7K5CEJ4H6\",\"WARC-Block-Digest\":\"sha1:3UR7VTU2XFL5PCW33ATK4RYSKBXDJP5U\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571911.5_warc_CC-MAIN-20220813081639-20220813111639-00376.warc.gz\"}"}