mnbinrnd

A generator MNBINRND and a density function MNBINPDF
1,4K download
Aggiornato 2 apr 2016

Visualizza la licenza

In many experimental settings in the life sciences, aggregated count data needs to be analyzed, for example, the number of mites on leaves of a tree, or the number of parasites found in hosts. This data is often well-described by a negative-binomial distribution.


Although Matlab's statistical toolbox has negative-binomial functions, they are parametrized for a limited form of the distribution based on the expected number of Bernoulli events needed to achieve a number of successes. The parameters are the event probability, P, and a positive integer aggregation constant, R, the number of successes.


The more general form is parametrized with a mean count W and an aggregation K. W and K are related to the traditional parameters P and R by the expressions:

P = K/(K + W) and K = R,


with the distinction that K is any positive real number, not just positive integers.

Here I provide two functions for the more general form, a generator MNBINRND and a density function MNBINPDF.
Requires the Statistics Toolbox.

Cita come

Don Maszle (2025). mnbinrnd (https://it.mathworks.com/matlabcentral/fileexchange/201-mnbinrnd), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R10
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Random Number Generation in Help Center e MATLAB Answers
Tag Aggiungi tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.1.0.0

No code changes. Updated to add BSD license.

1.0.0.0