# GT.wrapper: Multiple testing procedure for the grouped hypothesis In GroupTest: Multiple Testing Procedure for Grouped Hypotheses

## Description

This function is the main function to perform the two-stage testing for the grouped hypotheses.

## Usage

 ```1 2 3``` ```GT.wrapper(TestStatistic, alpha = 0.05, eta = alpha, pi1.ini = 0.7, pi2.1.ini = 0.4, L = 2, muL.ini = c(-1, 1), sigmaL.ini = c(1, 1), cL.ini = c(0.5, 0.5), DELTA = 0.001, sigma.KNOWN=FALSE) ```

## Arguments

 `TestStatistic` An array of list. Each list of the array corresponds to one group, containing the test statistic, stored as X, and the group size, stored as mg. `alpha` the targeted FDR level. By default, it is chosen as 0.05. `eta` the targeted FDR level within each group. The default and recommended choice is alpha. By default, it is chosen as α. `pi1.ini` Initial value: the probability that a group is significant. By default, it is chosen as 0.7 `pi2.1.ini` Initial value: the probability that an individual null hypothesis is false given that the group is significant. By default, it is chosen as 0.4. `L` The number of Gaussian component under the alternative hypothesis. By default, it is chosen as 2. `muL.ini` Initial value: a vector of means for all the components of the Gaussian mixture. By default, is is chosen as -1 and 1. `sigmaL.ini` Initial value: a vector of standard deviation of all the components of the Gaussian mixture. By default, it is chosen as 1 and 1. `cL.ini` Initial value: a vector of the probability for all the components of the Gaussian mixture. By default, it is chosen as 50% and 50%. `DELTA` The criteria to stop the EM algorithm. In this algorithm, we calcualte the maximum of absolution difference of the current estiamted value and its previous value for the parameters. By default, it is chosen as 0.0001. `sigma.KNOWN` The boolean variable, indicating whether the variance is known. Be default, it is chosen as FALSE.

## Value

The function returns a TSGroupTest object. It contains

 `parameter` this is a list, consisting of estimated parameters based on the EM algorithm. The elements are π_1, π_{2|1}, c_l, μ_l, σ_l. `TSGroupTest[[g]]` all the quntities regarding the g-th group, including the test statistic within this group, the individual conditional local fdr score ( P(θ_{gj}=0|x, θ_{g}=1)), the group-wise local fdr score (P(θ_g=0|x)), between-group decision, within-group decision

## Examples

 ```1 2 3 4 5``` ```data(GroupTest_simulate) GT.Test <- GT.wrapper( GroupTest_simulate, alpha=0.05, eta=alpha, pi1.ini=0.7, pi2.1.ini=0.4, L=2, muL.ini=c(-1,1), sigmaL.ini=c(1,2), cL.ini=c(0.4,0.6), DELTA=0.001, sigma.KNOWN=FALSE ) ```

GroupTest documentation built on May 30, 2017, 12:10 a.m.