Description Usage Arguments Value Author(s) References See Also Examples
View source: R/EstimatedHFDRControl.R
This function estimates two types of HFDR control appropriate for trees of hypotheses. If the BH procedure is applied at level alpha within each of the tree families, this is defined as
FDR.est := α * [\#\textit{discoveries} + \#\textit{families tested}] / [\textit{\#discoveries} + 1]
where a discovery is defined as an adjusted p value below alpha within the entire tree or at the tips for tree and tips FDR, respectively.
1 | EstimatedHFDRControl(hyp.tree)
|
hyp.tree |
An object of class |
tree |
The estimated full-tree FDR. |
tip |
The estimated outer-nodes FDR. |
n.families.tested |
The number of families of hypotheses tested by the HFDR procedure. |
n.tree.discoveries |
The number of discoveries over the whole tree. |
n.tip.discoveries |
The number of discoveries among the tree tips. |
Kris Sankaran
Yekutieli, D. Hierarchical false discovery rate-controlling methodology. Journal of the American Statistical Association, 103(481):309-316, 2008.
Benjamini, Y, and Yekutieli, D. Hierarchical fdr testing of trees of hypotheses. 2002.
Sankaran, K and Holmes, S. structSSI: Simultaneous and Selective Inference for Grouped or Hierarchically Structured Data. Journal of Statistical Software, 59(13), 1-21. 2014. http://jstatsoft.org/v59/i13/
hypothesesTree-class
hFDR.adjust
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library('igraph')
library('ape')
alternative.indices <- sample(1:49, 30)
unadj.p.values <- vector("numeric", length = 49)
unadj.p.values[alternative.indices] <- runif(30, 0, 0.01)
unadj.p.values[-alternative.indices] <- runif(19, 0, 1)
unadj.p.values[c(1:5)] <- runif(5, 0, 0.01)
names(unadj.p.values) <- paste("Hyp ", c(1:49))
tree <- as.igraph(rtree(25))
V(tree)$name <- names(unadj.p.values)
tree.el <- get.edgelist(tree)
hyp.tree <- hFDR.adjust(unadj.p.values, tree.el, 0.05)
EstimatedHFDRControl(hyp.tree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.