MyNixOS website logo
Description

Tools for Hypothesis Testing Based on Hypergeometric Intersection Distributions.

Hypergeometric Intersection distributions are a broad group of distributions that describe the probability of picking intersections when drawing independently from two (or more) urns containing variable numbers of balls belonging to the same n categories. <arXiv:1305.0717>.

hint

CRAN status metacran downloads R build status

Summary

hint is an R package for performing hypothesis testing based on Hypergeometric Intersection distributions. For example if you had three gene sets arising from three separate experiments with x genes shared between the three, you could determine the probability of arriving at this intersection size by chance. See the companion paper for more information.

Installation

install.packages("hint")

Usage

library(hint)

## The probability of an intersection of size 5 or greater 
## when sampling 15, 8, and 7 balls from three urns 
## each with 1 ball in each of 29 categories.

phint(29, c(15, 8, 7), vals = 5)
  v        cum.p
1 5 0.0002289938

## Formalising a hypothesis test using 'hint.test'.
# Categories given in the first column.
# Numbers of balls in each category given in subsequent columns: each column representing an urn.
dd <- data.frame(categories = letters[1:20], 
                 urn1_count = rep(1,20), 
                 urn2_count = rep(1,20))
tt <- hint.test(dd, letters[1:9], 
                letters[4:15], alternative = "greater")
print(tt)

Hypergeometric intersection test

Parameters:
 n  a  b  q  v 
20  9 12  0  6 

 P(X >= v)  =  0.4649917 

plot(tt)

## Allow duplicates in the second urn.
dd <- data.frame(letters[1:20], 
                 rep(1,20), 
                 c(rep(1,4), rep(2,16)))
tt <- hint.test(dd, letters[1:9], 
                letters[9:14], alternative = "less")
print(tt)

Hypergeometric intersection test

Parameters:
 n  a  b  q  v 
20  9  6 16  1 

 P(X <= v)  =  0.1596769

References

Kalinka (2013). The probability of drawing intersections: extending the hypergeometric distribution. arXiv.1305.0717

Metadata

Version

0.1-3

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows