This function calculate the betweengroup and withingroup local fdr scores for a given set of all the parameters.
1  GT.localfdr(TestStatistic, pi1, pi2.1, L, muL, sigmaL, cL)

TestStatistic 
An array of list. Each element of the array corresponds to one group, containing the test statistic, stored as X, and the group size, stored as mg. 
L 
The number of Gaussian component under the alternative hypothesis. 
pi1 
π_1, the probability that a group is significant. 
pi2.1 
π_{21}, the probability that an individual null hypothesis is false given that the group is significant. 
muL 
a vector of means for all the components of the Gaussian mixture. 
sigmaL 
a vector of standard deviation of all the components of the Gaussian mixture. 
cL 
a vector of the probability for all the components of the Gaussian mixture. 
This function returns an array of G lists where G is the number of groups.
TSGroupTest[[g]] 
in each element, the individual conditional local fdr score ( P(θ_{gj}=0x, θ_{g}=1)), the groupwise local fdr score (P(θ_g=0x)), are stored. 
1 2 3  data(GroupTest_simulate)
GroupTest_simulate < GT.localfdr( GroupTest_simulate, L=2, pi1=0.5,
pi2.1=0.5, muL=c(1, 1), sigmaL=c(1,2), cL=c(0.4,0.6) )

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.