Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/utility-methods.R
Statistical enrichment analysis using either a Hypergeometric or Fisher's test
1 2 3 4 5 6 7 | enrichment.test(
sample_true,
sample_size,
pop_true,
pop_size,
method = c("fisher", "hyper")
)
|
sample_true |
Number of hits in sample |
sample_size |
Size of sample |
pop_true |
Number of hits in population |
pop_size |
Size of population |
method |
Statistical method that should be used |
Hypergeometric or one-tailed Fisher exact test is useful for enrichment analyses. For example, one needs to estimate which features are enriched among a set of instances sampled from a population.
A list containing the following components:
|
P-value of the test |
|
Odds ratio |
|
Confidence interval for the odds ratio (only shown with method="fisher") |
|
Used statistical test |
Daniel C. Ellwanger
Hypergeometric
and fisher.test
1 2 3 4 5 | # Population has 13 of total 52 instances positive for a given feature
# Sample has 1 of total 5 instances positive for a given feature
# Test for significance of enrichment in sample
enrichment.test(sample_true=1, sample_size=5,
pop_true=13, pop_size=52, method="fisher")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.