BiasedUrn (version 1.07)

BiasedUrn-package: 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.

Arguments

Author

Agner Fog

Maintainer: Agner Fog <agner@agner.org>

Details

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

Univariate functions in this package

Wallenius' noncentral hypergeometricFisher's noncentral hypergeometric
Probability mass functiondWNCHypergeodFNCHypergeo
Cumulative distribution functionpWNCHypergeopFNCHypergeo
Quantile functionqWNCHypergeoqFNCHypergeo
Random variate generation functionrWNCHypergeorFNCHypergeo
Calculate meanmeanWNCHypergeomeanFNCHypergeo
Calculate variancevarWNCHypergeovarFNCHypergeo
Calculate modemodeWNCHypergeomodeFNCHypergeo
Estimate odds from meanoddsWNCHypergeooddsFNCHypergeo
Estimate number from mean and oddsnumWNCHypergeonumFNCHypergeo
Minimum xminHypergeominHypergeo
Maximum xmaxHypergeomaxHypergeo

Multivariate functions in this package

Wallenius' noncentral hypergeometricFisher's noncentral hypergeometric
Probability mass functiondMWNCHypergeodMFNCHypergeo
Random variate generation functionrMWNCHypergeorMFNCHypergeo
Calculate meanmeanMWNCHypergeomeanMFNCHypergeo
Calculate variancevarMWNCHypergeovarMFNCHypergeo
Calculate mean and variancemomentsMWNCHypergeomomentsMFNCHypergeo
Estimate odds from meanoddsMWNCHypergeooddsMFNCHypergeo
Estimage number from mean and oddsnumMWNCHypergeonumMFNCHypergeo
Minimum xminMHypergeominMHypergeo
Maximum xmaxMHypergeomaxMHypergeo

References

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

See Also

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

Examples

Run this code
dWNCHypergeo(12, 25, 32, 20, 2.5)

Run the code above in your browser using DataLab