SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p >
D uint multipleTesting (D float32[[1]] statistics, float32[[1]] quantiles)
 
template<domain D :shared3p >
D uint multipleTesting (D float64[[1]] statistics, float64[[1]] quantiles)
 

Detailed Description

Perform the Benjamini-Hochberg procedure for false discovery rate control.

Note
If multiple variables of a dataset are used for testing a hypothesis then this procedure will help avoid false discoveries (incorrectly rejected null hypothesis). This procedure does comparisons of the form t >= q where t is the test statistic and q is a critical quantile. This means it can only be used for tests that have that form of comparison (upper tail). For example, when using the "greater" hypothesis t-test which checks if the mean of the first distribution exceeds the mean of the second.
D - shared3p protection domain
Parameters
statistics- vector of calculated test statistics
quantiles- vector of critical values of the test statistics. The i-th value should be Q(i / k ⋅ alpha) where k is the number of tests, alpha is the significance level and Q is the quantile function of the distribution of the test statistic. Note that you have to use the quantile function correctly depending on your test. For example, when using the "greater" hypothesis t-test, the decision is 1 - P(t) < alpha which means the quantiles should be calculated as 1 - Q(p), not Q(p).
Returns
returns the indices of the tests for which the null hypothesis is rejected
Leakage
Leaks the ordering of significant test statistics (but not the statistics)

Function Documentation

◆ multipleTesting() [1/2]

D uint multipleTesting ( D float32[[1]]  statistics,
float32[[1]]  quantiles 
)

◆ multipleTesting() [2/2]

D uint multipleTesting ( D float64[[1]]  statistics,
float64[[1]]  quantiles 
)