Description Usage Arguments Value Author(s) References Examples
Given a set of p-values, return the decisions using the generalized stepwise procedure.
1 |
tree |
the edgelist parameterizing the hierarchical structure between hypotheses. The edges must be stored so that each edge is a row of a two column matrix, where the first column gives the parent and the second gives the child. |
pvals |
a vector of raw p-values resulting from an experiment. The names of this vector should be contained in the edgelist parameterizing the hierarchical structure between hypothesis, inputted as |
alpha |
the significant level used to calculate the critical values to make decisions. |
type |
the type of dependence structure of the hierarchically ordered hypotheses. Currently, we provide four types of dependence: |
logical values of each hypothesis being rejected or not, if TRUE
, then the hypothesis is rejected; otherwise, the hypothesis is not rejected.
Yalin Zhu
Lynch, G., Guo, W. (2016). On Procedures Controlling the FDR for Testing Hierarchically Ordered Hypotheses. arXiv preprint arXiv:1612.04467.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(igraph)
library(ape)
library(structSSI)
library(phyloseq)
data("chlamydiae")
environments <- sample_data(chlamydiae)$SampleType
abundances <- otu_table(chlamydiae)
graph.tree <- as.igraph(phy_tree(chlamydiae))
edge.tree <- get.edgelist(graph.tree)
pVal <- treePValues(edge.tree, abundances, environments)
pVal[which(is.na(pVal))] = 1; # these have all 0 abundances in every environment
decision1 <- hier.test(tree = graph.tree, pvals = pVal, alpha = 0.01, type = "positive")
decision2 <- hier.test(tree = graph.tree, pvals = pVal, alpha = 0.01, type = "arbitrary")
## show the number of rejections under different types of dependence
length(which(decision1 == TRUE)); length(which(decision2 == TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.