rchyper {chyper}R Documentation

Random number generator for conditional hypergeometric distributions

Description

Generates random numbers from a conditional hypergeometric distribution: the distribution of how many items are in the overlap of all samples when samples of arbitrary size are each taken without replacement from populations of arbitrary size.

Usage

rchyper(size, s, n, m, verbose = T)

Arguments

size

the number of random numbers to generate

s

an integer representing the size of the intersecting population

n

a vector of integers representing the sizes of each non-intersecting population

m

a vector of integers representing the sample sizes

verbose

T/F should intermediate messages be printed?

Value

A vector of random numbers generated from the PMF of the conditional hypergeometric distribution specified by the parameters

Examples

rchyper(100, 10, c(12,13,14), c(7,8,9))


[Package chyper version 0.3.1 Index]