| qch.test {qch} | R Documentation |
Perform composite hypothesis testing.
Description
Perform any composite hypothesis test by specifying
the configurations 'Hconfig.H1' corresponding to the composite alternative hypothesis
among all configurations 'Hconfig'.
By default, the function performs the composite hypothesis test of being associated with "at least q" simple tests, for q=1,..Q.
Usage
qch.test(res.qch.fit, Hconfig, Hconfig.H1 = NULL, Alpha = 0.05, threads_nb = 0)
Arguments
res.qch.fit |
The result provided by the |
Hconfig |
A list of all possible combination of |
Hconfig.H1 |
An integer vector (or a list of such vector) of the |
Alpha |
the nominal Type I error rate for FDR control. Default is |
threads_nb |
The number of threads to use. The number of thread will set to the number of core available by default. |
Value
A list with the following elements:
Rejection | a matrix providing for each item the result of the composite hypothesis test, after adaptive Benjamin-Höchberg multiple testing correction. |
lFDR | a matrix providing for each item its local FDR estimate. |
Pvalues | a matrix providing for each item its p-value of the composite hypothesis test. |
See Also
qch.fit(), GetH1AtLeast(),GetH1Equal()
Examples
data(PvalSets_cor)
PvalMat <- as.matrix(PvalSets_cor[,-3])
Truth <- PvalSets[,3]
## Build the Hconfig objects
Q <- 2
Hconfig <- GetHconfig(Q)
## Infer the posteriors
res.fit <- qch.fit(pValMat = PvalMat, Hconfig = Hconfig, copula="gaussian")
## Run the test procedure with FDR control
H1config <- GetH1AtLeast(Hconfig,2)
res.test <- qch.test(res.qch.fit = res.fit,Hconfig = Hconfig, Hconfig.H1 = H1config)
table(res.test$Rejection$AtLeast_2,Truth==4)