mHG.test {mHG} | R Documentation |
Performs a minimum-hypergeometric (mHG) test. The null-hypothesis is that provided list was randomly and equiprobable selected from all lists containing N entries, B of which are 1s. The alternative hypothesis is that the 1s tend to appear at the top of the list.
mHG.test(lambdas, n_max = length(lambdas))
lambdas |
|
n_max |
the algorithm will only consider the first |
O(NB)
running time, O(NB)
space.
A list with class "htest" containing the following components:
statistic |
The mHG statistic. |
p.value |
The p-value for the test. |
parameters |
|
n |
The index for which the mHG was obtained (smallest one if several n give the same mHG). |
b |
|
Kobi Perl
Eden, E. (2007). Discovering Motifs in Ranked Lists of DNA Sequences. Haifa. Retrieved from http://bioinfo.cs.technion.ac.il/people/zohar/thesis/eran.pdf (pages 10-12, 18-20)
N <- 50
B <- 15
lambdas <- numeric(50)
lambdas[sample(N, B)] <- 1
t <- mHG.test(lambdas)
t <- mHG.test(lambdas, n_max = 20)