enrichment.test {CellTrails} | R Documentation |
Statistical enrichment analysis using either a Hypergeometric or Fisher's test
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
# 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")