hint.dist.test {hint} | R Documentation |
hint.dist.test
Description
Tests whether the absolute distance between two intersection sizes would be expected by chance, i.e. whether they fall into opposite tails of their respective Hypergeometric Intersection distributions.
Usage
hint.dist.test(d, n1, A1, n2, A2, q1 = 0, q2 = 0, alternative = "greater")
Arguments
d |
A positive integer specifying the observed distance to be tested. |
n1 |
An integer specifying the number of categories in the urns for the first distribution. |
A1 |
An integer vector specifying the number of balls drawn from urns for the first distribution. |
n2 |
An integer specifying the number of categories in the urns for the second distribution. |
A2 |
An integer vector specifying the number of balls drawn from the urns for the second distribution. |
q1 |
An integer specifying the number of categories with duplicates in the second urn of the first distribution. If 0 then the symmetric, singleton case is computed, otherwise the asymmetric, duplicates case is computed (see |
q2 |
An integer specifying the number of categories with duplicates in the second urn of the second distribution. If 0 then the symmetric, singleton case is computed, otherwise the asymmetric, duplicates case is computed (see |
alternative |
A characer string specifying the hypothesis to be tested. Can be one of "greater", "less", or "two.sided". |
Details
The distribution of absolute distances between two hypergeometric intersection sizes is given by
P(X=d) = \sum_{\{v_{1},v_{2}\}_{i} \in D_{d}}^{|D_{d}|} P(v_{1_i}|n_{1},a_{1},b_{1},...)\cdot P(v_{2_i}|n_{2},a_{2},b_{2},...)
where D_{d}
is the set of pairs of intersection sizes, \{v_{1},v_{2}\}
, with absolute differences of size d
.
Value
An object of class hint.dist.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.