Description Usage Arguments Value Examples
View source: R/QCH_functions.R
Perform composed hypothesis testing with FDR control
1 | qch.test(posterior, Hconfig.H1, Alpha = 0.05)
|
posterior |
a matrix of posterior probabilities for each item to belong the different H-configurations, as provided by the |
Hconfig.H1 |
a list of H1 config, as created by the |
Alpha |
the nominal Type I error rate for FDR control. |
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.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.