qch.test: Perform composed hypothesis testing with FDR control

Description Usage Arguments Value Examples

View source: R/QCH_functions.R

Description

Perform composed hypothesis testing with FDR control

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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)

qch documentation built on May 7, 2021, 5:06 p.m.