Description Usage Arguments Details Value Author(s) References Examples
Calculates the p-value associated with the (minimum-hypergeometric) mHG statistic.
1 | mHG.pval.calc(p, N, B, n_max = N)
|
p |
the mHG statistic. It is marked as p as it represents an "uncorrected" p-value. |
N |
total number of white and black balls (according to the hypergeometric problem definition). |
B |
number of black balls. |
n_max |
the algorithm will calculate the p-value under the assumption that only the first n_max partitions were taken into account in determining the mHG statistic. |
O(NB) running time, O(NB) space.
the p-value of the test.
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 11-12, 19-20)
1 2 3 4 5 6 | N <- 50
B <- 15
lambdas <- numeric(50)
lambdas[sample(N, B)] <- 1
p <- mHG.statistic.calc(lambdas)@mHG
p.corrected <- mHG.pval.calc(p, N, B) # Could have used mHG.test directly
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.