knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
cmpreg
: Reparametrized COM-Poisson Regression ModelsEduardo E. R. Junior - jreduardo@usp.br, IME-USP
The cmpreg
package contains functions to fit Conway-Maxwell-Poisson
(COM-Poisson) models with varying dispersion (model mean and dispersion
parameters as functions of covariates.) in the mean-type parametrization
proposed by Ribeiro Jr, et al. 2018
Joint work with Walmes M. Zeviani and Clarice G.B. Demétrio.
You can install the development version of cmpreg
from
GitHub with:
# install.packages("devtools") devtools::install_github("jreduardo/cmpreg")
Basically, this package implements methods similar to those related to
glm objects. The main function is cmp(...)
.
library(cmpreg) # Fit model ------------------------------------------------------------ model <- cmp(formula = ninsect ~ extract, dformula = ~extract, data = sitophilus) # Methods -------------------------------------------------------------- print(model) summary(model) equitest(model) # Predict new data ----------------------------------------------------- newdf <- sitophilus[c(1, 11, 21, 31), -2, drop = FALSE] predict(model, newdata = newdf, what = "all", type = "response", se.fit = TRUE, augment_data = TRUE)
Currently, the methods implemented for "cmpreg"
objects are
methods(class = "cmpreg")
There are other R packages to deal with COM-Poisson models that have
somehow contributed to the writing of cmpreg
.
compoisson
: Routines for density and moments of the
COM-Poisson distribution under original parametrization.CompGLM
: Fit COM-Poisson models under original
parametrization (includes dispersion modeling).COMPoissonReg
: Fit COM-Poisson models under
original parametrization (includes zero-inflation and dispersion
modeling).glmmTMB
: Fit (among other) COM-Poisson models under a
different mean-parametrization (includes zero-inflation, dispersion
modeling and random effects).The gammacount
package is licensed under the GNU General Public
License, version 3, see file LICENSE.md
, © 2019 E. E., Ribeiro Jr.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.