super_families.test: Test of a Super Family Hypotheses Tree

Description Usage Arguments Details Value Examples

View source: R/super_families.test.R

Description

Tests all hypotheses nodes contained in a super family hypotheses tree.

Usage

1
super_families.test(super_families, kappa = 0.001)

Arguments

super_families

Hypotheses tree of type data.tree::Node.

kappa

The parameter kappa describes the percentage of signals (small p-values) needed for a level-1 hypotheses to be rejected, i.e., to be not considered as noise only. See the parameter kappa in hierasymptkappa.

Details

The nodes in super_families are tested recursively. For testing the level-1 hypotheses the attribute "p_values" assigned with a vector of p-values is required. The function hierasymptkappa is applied on the the list of p-value vectors. For level larger than one a hypothesis is rejected if and only if at least one child hypothesis is rejected.

Value

The hypotheses tree super_families with added or updated attribute "test_results" for level-1 hypotheses (logical vector) and attribute "rejected" for all nodes. (TRUE or FALSE)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
super_families <- Node$new("H31")
super_families$AddChild("H21")$AddChild("H11")$AddSibling("H12")
super_families$AddChild("H13")

set.seed(1)
for (H in super_families.get_hypotheses_at_level(super_families, level = 1)) {
  p_values <- runif(10)
  ind <- sample(1:10, sample(c(0,1)))
  p_values[ind] <- 0
  Set(list(H), p_values = list(p_values))
}
rm(ind, p_values)
super_families.test(super_families)
Get(Traverse(super_families), "p_values")
Get(Traverse(super_families), "test_results")

print(super_families, "rejected")

WIAS-BERLIN/hierarchicalFDR documentation built on Dec. 30, 2019, 11:49 p.m.