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 qch.fit() function.

Hconfig

A list of all possible combination of H_0 and H_1 hypotheses generated by the GetHconfig() function.

Hconfig.H1

An integer vector (or a list of such vector) of the Hconfig index corresponding to the composite alternative hypothesis configuration(s). Can be generated by the GetH1AtLeast() or GetH1Equal() functions. If NULL, the composite hyporhesis tests of being associated with "at least q" simple tests, for q=1,..Q are performed.

Alpha

the nominal Type I error rate for FDR control. Default is 0.05.

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)



[Package qch version 2.0.0 Index]