BiasedUrn-package {BiasedUrn}R Documentation

Biased Urn Model Distributions

Description

Statistical models of biased sampling in the form of univariate and multivariate noncentral hypergeometric distributions, including Wallenius' noncentral hypergeometric distribution and Fisher's noncentral hypergeometric distribution (also called extended hypergeometric distribution).

These are distributions that you can get when taking colored balls from an urn without replacement, with bias. The univariate distributions are used when there are two colors of balls. The multivariate distributions are used when there are more than two colors of balls.

The (central) univariate and multivariate hypergeometric distribution can be obtained by setting odds = 1.

Please see vignette("UrnTheory") for a definition of these distributions and how to decide which distribution to use in a specific case.

Details

Package: BiasedUrn
Type: Package
Version: 1.06
Date: 2013-11-06
License: GPL

Univariate functions in this package

Wallenius' noncentral hypergeometric Fisher's noncentral hypergeometric
Probability mass function dWNCHypergeo dFNCHypergeo
Cumulative distribution function pWNCHypergeo pFNCHypergeo
Quantile function qWNCHypergeo qFNCHypergeo
Random variate generation function rWNCHypergeo rFNCHypergeo
Calculate mean meanWNCHypergeo meanFNCHypergeo
Calculate variance varWNCHypergeo varFNCHypergeo
Calculate mode modeWNCHypergeo modeFNCHypergeo
Estimate odds from mean oddsWNCHypergeo oddsFNCHypergeo
Estimate number from mean and odds numWNCHypergeo numFNCHypergeo
Minimum x minHypergeo minHypergeo
Maximum x maxHypergeo maxHypergeo

Multivariate functions in this package

Wallenius' noncentral hypergeometric Fisher's noncentral hypergeometric
Probability mass function dMWNCHypergeo dMFNCHypergeo
Random variate generation function rMWNCHypergeo rMFNCHypergeo
Calculate mean meanMWNCHypergeo meanMFNCHypergeo
Calculate variance varMWNCHypergeo varMFNCHypergeo
Calculate mean and variance momentsMWNCHypergeo momentsMFNCHypergeo
Estimate odds from mean oddsMWNCHypergeo oddsMFNCHypergeo
Estimage number from mean and odds numMWNCHypergeo numMFNCHypergeo
Minimum x minMHypergeo minMHypergeo
Maximum x maxMHypergeo maxMHypergeo

Note

The implementation cannot run safely in multiple threads simultaneously

Author(s)

Agner Fog

Maintainer: Agner Fog <agner@agner.org>

References

http://www.agner.org/random/

See Also

vignette("UrnTheory")
BiasedUrn-Univariate.
BiasedUrn-Multivariate.
dhyper
fisher.test

Examples

dWNCHypergeo(12, 25, 32, 20, 2.5)

[Package BiasedUrn version 1.07 Index]