Hypergeometric.test: Hypergeometric.test

Description Usage Arguments Value Examples

View source: R/Hypergeometric.R

Description

Calculates the significance of an overlap of two sets using an hypergeometric test. It is a wrapper of the 'phyper' function.

Usage

1
2
3
4
5
6
7
Hypergeometric.test(
  success,
  universe_success,
  universe_failure,
  size_collected,
  lower.tail = FALSE
)

Arguments

success

Is the number of elements in the overlap of the sets.

universe_success

Is the number of elements of the set of interest.

universe_failure

Is the number of elements of the set of the other set.

size_collected

The total of elements in the universe

lower.tail

Should the test be calculated on the lower tail? (Hypothesis test is lower than)

Value

the p-value for the hypergeometric test.

Examples

1
2
3
4
5
6
7
require(magrittr)
s = 10; S = 15; f = 10; T = 30
Hypergeometric.test(success = s,
universe_success = S,
universe_failure = f,
size_collected = T
)

NetSci documentation built on Dec. 11, 2021, 9:21 a.m.