Title: | Flexible Modeling of Multivariate Count Data via the Multivariate Conway-Maxwell-Poisson Distribution |
---|---|
Description: | A toolkit containing statistical analysis models motivated by multivariate forms of the Conway-Maxwell-Poisson (COM-Poisson) distribution for flexible modeling of multivariate count data, especially in the presence of data dispersion. Currently the package only supports bivariate data, via the bivariate COM-Poisson distribution described in Sellers et al. (2016) <doi:10.1016/j.jmva.2016.04.007>. Future development will extend the package to higher-dimensional data. |
Authors: | Kimberly Sellers [aut], Darcy Steeg Morris [aut], Narayanaswamy Balakrishnan [aut], Diag Davenport [aut, cre] |
Maintainer: | Diag Davenport <[email protected]> |
License: | GPL-3 |
Version: | 1.0 |
Built: | 2024-11-06 02:39:19 UTC |
Source: | https://github.com/diagdavenport/multicmp |
The number of accidents incurred by 122 shunters in two consecutive year periods, namely 1937 - 1942 and 1943 - 1947
accidents
accidents
A dataframe with 122 rows and 2 variables:
Number of shunter accidents between 1937 and 1942
Number of shunter accidents between 1943 and 1947
A. Arbous, J.E. Kerrick, Accident statistics and the concept of accident proneness, Biometrics 7 (1951) 340-432.
Density for the Bivariate Conway-Maxwell-Poisson (CMP) distribution
dbivCMP(lambda, nu, bivprob, x, y, maxit)
dbivCMP(lambda, nu, bivprob, x, y, maxit)
lambda |
Mean/rate parameter under Poisson model. |
nu |
Dispersion parameter. |
bivprob |
Bivariate probabilities, p00, p01, p10, p11. |
x |
x values |
y |
y values |
maxit |
Number of terms used to truncate infinite sum calculations. |
Sellers KF, Morris DS, Balakrishnan N (2016) Bivariate Conway-Maxwell-Poisson Distribution: Formulation, Properties, and Inference, Journal of Multivariate Analysis 150:152-168.
dbivCMP(lambda=10, nu=1, bivprob=c(0.4, 0.2, 0.3, 0.1), x=2, y=3, maxit = 100) #this is equivalent to the pmf P(X=2,Y=3) of a bivariate Poisson ##with lambda1=3, lambda2=2, lambda3=1
dbivCMP(lambda=10, nu=1, bivprob=c(0.4, 0.2, 0.3, 0.1), x=2, y=3, maxit = 100) #this is equivalent to the pmf P(X=2,Y=3) of a bivariate Poisson ##with lambda1=3, lambda2=2, lambda3=1
multicmpests
computes the maximum likelihood estimates of a bivariate COM-Poisson distribution (based on the model described in Sellers et al. (2016)) for given count data and conducts a test for significant data dispersion, relative to a bivariate Poisson model.
The bivariate Poisson case is addressed via the bivpois package by Karlis and Ntzoufras (2009).
multicmpests(data, max = 100, startvalues = NULL)
multicmpests(data, max = 100, startvalues = NULL)
data |
A two-column dataset of counts. |
max |
Truncation term for infinite summation associated with the Z function. See Sellers et al. (2016) for details. |
startvalues |
A vector of starting values for maximum likelihood estimation. The values are read as follows: c(lambda, nu, p00, p10, p01, p11). The default is c(1,1, 0.25, 0.25, 0.25, 0.25). |
multicmpests
will return a list of four elements: $par (Parameter Estimates), $negll (Negative Log-Likelihood), $LRTbpd (Dispersion Test Statistic), and
$pbpd (Dispersion Test P-Value).
Sellers KF, Morris DS, Balakrishnan N (2016) Bivariate Conway-Maxwell-Poisson Distribution: Formulation, Properties, and Inference, Journal of Multivariate Analysis 150:152-168.
Karlis D., Ntzoufras I. (2009) bivpois: Bivariate Poisson Models Using the EM Algorithm, Version 0.50-3.1. http://cran.wustl.edu/web/packages/bivpois/index.html
x1 <- c(3,2,5,4,1) x2 <- c(0,4,1,0,1) ex.data <- cbind(x1,x2) # starting close to the optimum for sake of run time multicmpests(ex.data, startvalues = c(12.5 , 1.7 , 0, 0.25, 0.75, 0))
x1 <- c(3,2,5,4,1) x2 <- c(0,4,1,0,1) ex.data <- cbind(x1,x2) # starting close to the optimum for sake of run time multicmpests(ex.data, startvalues = c(12.5 , 1.7 , 0, 0.25, 0.75, 0))