# param_general_GW: General exceedance control using the GW method In Jiefei-Wang/exceedance: Multiple Hypothesis Testing While Controlling the Exceedance Probability of the False Discovery Proportion

 param_general_GW R Documentation

## General exceedance control using the GW method

### Description

Performing a general exceedance control of the false discovery proportion(FDP) under the framework proposed by Genovese, C., & Wasserman, L. (2004), where FDP is defined by the number of false positives devided by the number of total rejections. The GW method requires an uniform(0,1) distributional test statistic and each value in the input data represents a p-value from a hypothesis. The sources of the data can be derived from any testing procedure (e.g. pvalues from testing high-throughput gene data). This function works for all distributional test statistics. There are fast algorithms exist for some statistics. Please see the function `param_fast_GW` for more details.

### Usage

```param_general_GW(pvalue_func, algorithm = c("general", "JW"))
```

### Arguments

 `pvalue_func` function, The pvalue function for a uniform(0,1) distributional test. The inpute samples(pvalues) will be ascending sorted. `algorithm` character, The searching algorithm that will be used to find the upper bound of the FDR, see details.

### Details

Note: We will use the term `samples` and `pvalues` interchangebly to refer the data gathered by a large-scale inference procedure.

Computing the upper bound of the FDP using the GW method is computationally challenging. Given the number of hypotheses `n`, the naive algorithm requires approximately `2^n` operations, which make it only available for small inference. Therefore, JW algorithm is developed for reducing the computational burden, but it also add a restriction on the test statistic.

If `general = "general"`, it means the naive method proposed by GW. There is no additional assumptions on the pvalue function except the regular definition of the pvalue.

If `general = "JW"`, the pvalue function must be a non-decreasing function for its input samples. That is, if input1 and input2 are two set of ascending sorted samples and input1 is not smaller than the input2 for all elements, then the resulting pvalue for input1 should not be smaller than the pvalue for input2.

With an additional restriction on the pvalue function, the JW algorithm has a polynomial computational complexity.

### Value

an exceedance_parameters object

### Examples

```## kth pvalue test
k_test <- function(x,k){
n <- length(x)
if(length(x) >= k)
pbeta(x[k], k, n-k+1)
else
1
}

## general algorithm, very slow
param_general_GW(pvalue_func = k_test, algorithm = "general")

## JW algorithm, relatively qucik
## You need to verify if the pvalue function
## satisfies the requirement of the JW algorithm
## before use it.
param_general_GW(pvalue_func = k_test, algorithm = "JW")

```

Jiefei-Wang/exceedance documentation built on May 11, 2022, 1:43 a.m.