enrichment.test {CellTrails} | R Documentation

## Enrichment test

### Description

Statistical enrichment analysis using either a Hypergeometric or Fisher's test

### Usage

    enrichment.test(sample_true, sample_size, pop_true, pop_size,
      method = c("fisher", "hyper"))

### Arguments

`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

### Details

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.

### Value

A list containing the following components:

``p.value`` | P-value of the test
``odds.ratio`` | Odds ratio
``conf.int`` | Confidence interval for the odds ratio (only shown with method="fisher")
``method`` | Used statistical test

### Author(s)

Daniel C. Ellwanger

### See Also

`Hypergeometric` and `fisher.test`

### Examples

    # 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")

[Package CellTrails version 1.0.1 Index]