qch.test {qch}R Documentation

Perform composed hypothesis testing with FDR control

Description

Perform composed hypothesis testing with FDR control

Usage

qch.test(posterior, Hconfig.H1, Alpha = 0.05)

Arguments

posterior

a matrix of posterior probabilities for each item to belong the different H-configurations, as provided by the qch.fit() function.

Hconfig.H1

a list of H1 config, as created by the GetHinfo() function.

Alpha

the nominal Type I error rate for FDR control.

Value

A list of 2 objects 'Rejection' and 'lFDR'. Object 'Rejection' is a vector providing for each item the result of the composed hypothesis test, after multiple testing correction. Object 'lFDR' is a vector providing for each item its local FDR estimate.

Examples

data(PvalSets)
PvalMat <- as.matrix(PvalSets[,-3])
Truth <- PvalSets[,3]

## Build the Hconfig objects
Q <- 2
AtLeast <- 2
Hconfig <- GetHinfo(Q,AtLeast)$Hconfig
Hconfig.H1 <- GetHinfo(Q,AtLeast)$Hconfig.H1

## Infer the posteriors
res.fit <- qch.fit(PvalMat,Hconfig)

## Run the test procedure with FDR control
res.test <- qch.test(res.fit$posterior,Hconfig.H1)
table(res.test$Rejection,Truth==4)

[Package qch version 1.0.0 Index]