Title: | Conway-Maxwell-Poisson Distribution Function |
---|---|
Description: | Provides functions for calculating the Conway-Maxwell-Poisson distribution function and variable simulation |
Authors: | Devin S. Johnson |
Maintainer: | Devin S. Johnson <[email protected]> |
License: | CC0 |
Version: | 0.0.2 |
Built: | 2025-01-30 03:06:16 UTC |
Source: | https://github.com/dsjohnson/cmpR |
Distribution and sampling fucntion are provided for the Conway-Maxwell-Poisson distribution. The 'mu' parameterization of Guikema and Goffelt (2008), where floor(mu) is the median of the distribution. The other parameter 'nu' controls over and underdispersion. For 0 < nu < 1, the distribution is overdispersed relative to a Poisson. For nu > 1, the distribution is underdispersed. For nu = 0, the distribution is equal to a geometric (for mu<1) and if nu = 1, the distribution is equal to the Poisson.
Package: | cmpR |
Type: | Package |
Version: | 0.0.1 |
Date: | May 15, 2017 |
License: | CC0 |
LazyLoad: | yes |
This software package is developed and maintained by scientists at the NOAA Fisheries Alaska Fisheries Science Center and should be considered a fundamental research communication. The reccomendations and conclusions presented here are those of the authors and this software should not be construed as official communication by NMFS, NOAA, or the U.S. Dept. of Commerce. In addition, reference to trade names does not imply endorsement by the National Marine Fisheries Service, NOAA. While the best efforts have been made to insure the highest quality, tools such as this are under constant development and are subject to change.
Devin S. Johnson
Maintainer: Devin S. Johnson <[email protected]>
Guikema, S.D. and Goffelt, J.P., 2008. A flexible count data regression model for risk analysis. Risk analysis, 28(1), pp.213-223.
Probability mass function and random generation for the Conway-Maxwell-Poisson distribution for given values of the parameters.
dcmp(x, mu, nu, log = FALSE)
dcmp(x, mu, nu, log = FALSE)
x |
quantile at which the prob. mass function is evaluated. |
mu |
location parameter |
nu |
dispersion parameter |
log |
Logical. Whether or not the log PMF is returned. |
n |
number of random draws to return |
Computes PMF and makes random draws from the Conway-Maxwell-Poisson (CMP) distribution. The PMF of the CMP is given by
(Guikema and Goffelt 2008).
The normalizing constant is calculated using a combination of finite truncation of the infinite sum as well as an approximation provided by Shmueli et al. (2005) for small nu and large mu.
Devin S. Johnson and Jeffrey Dunn
Guikema, Seth D., and Jeremy P. Goffelt. "A flexible count data regression model for risk analysis." Risk analysis 28.1 (2008): 213-223.
Shmueli, Galit, et al. "A useful distribution for fitting discrete data: revival of the Conway–Maxwell–Poisson distribution." Journal of the Royal Statistical Society: Series C (Applied Statistics) 54.1 (2005): 127-142.
x = rcmp(1000, 10, 2) plot(table(x)/length(x)) pmf = dcmp(x, 10, 2) points(x, pmf)
x = rcmp(1000, 10, 2) plot(table(x)/length(x)) pmf = dcmp(x, 10, 2) points(x, pmf)