hint.test {hint} | R Documentation |
hint.test
Description
Apply the hypergeometric intersection test to categorical data to test for enrichment or depletion of intersections between two samples.
Usage
hint.test(cats, draw1, draw2, alternative = "greater")
Arguments
cats |
A data frame or matrix with 3 columns; the first gives the category identifier, and the second and third give the number of balls belonging to this category in the first and second urns respectively. |
draw1 |
A vector of objects corresponding to the categories given in cats drawn from the first urn. |
draw2 |
A vector of objects corresponding to the categories given in cats drawn from the second urn. |
alternative |
A characer string specifying the hypothesis to be tested. Can be one of "greater", "less", or "two.sided". |
Details
The hypergeometric intersection distributions describe the distribution of intersection sizes when sampling without replacement from two separate urns in which reside balls belonging to the same n object categories (see Hyperintersection
).
Value
An object of class hint.test
, which is a list containing the following components:
-
parameters
An integer vector giving the parameter values. -
p.value
A numerical value giving the p-value associated with the test. -
alternative
A character string naming the hypothesis that was tested.
References
Kalinka, A. T. (2013). The probability of drawing intersections: extending the hypergeometric distribution. arXiv.1305.0717