Description Details Note Author(s) References See Also Examples

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.

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 |

The implementation cannot run safely in multiple threads simultaneously

Agner Fog

Maintainer: Agner Fog <agner@agner.org>

`vignette("UrnTheory")`

`BiasedUrn-Univariate`

.

`BiasedUrn-Multivariate`

.

`dhyper`

`fisher.test`

1 | ```
dWNCHypergeo(12, 25, 32, 20, 2.5)
``` |

```
[1] 0.2183387
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.