Learn R Programming

COMPoissonReg (version 0.6.1)

glm.cmp: COM-Poisson and Zero-Inflated COM-Poisson regression

Description

Fit COM-Poisson regression using maximum likelihood estimation. Zero-Inflated COM-Poisson can be fit by specifying a regression for the overdispersion parameter.

The COM-Poisson regression model is $$ y_i \sim \rm{CMP}(\lambda_i, \nu_i), \;\;\; \log \lambda_i = \bm{x}_i^\top \beta, \;\;\; \log \nu_i = \bm{s}_i^\top \gamma. $$

The Zero-Inflated COM-Poisson regression model assumes that \(y_i\) is 0 with probability \(p_i\) or \(y_i^*\) with probability \(1 - p_i\), where $$ y_i^* \sim \rm{CMP}(\lambda_i, \nu_i), \;\;\; \log \lambda_i = \bm{x}_i^\top \beta, \;\;\; \log \nu_i = \bm{s}_i^\top \gamma, \;\;\; \log p_i = \bm{w}_i^\top \zeta. $$

Usage

glm.cmp(formula.lambda, formula.nu = ~ 1, formula.p = NULL,
        beta.init = NULL, gamma.init = NULL, zeta.init = NULL, ...)

# S3 method for cmp AIC(object, ..., k = 2) # S3 method for cmp BIC(object, ...) # S3 method for cmp coef(object, ...) # S3 method for cmp deviance(object, ...) # S3 method for cmp equitest(object, ...) # S3 method for cmp leverage(object, ...) # S3 method for cmp logLik(object, ...) # S3 method for cmp nu(object, ...) # S3 method for cmp parametric_bootstrap(object, reps = 1000, report.period = reps + 1, ...) # S3 method for cmp predict(object, newdata = NULL, ...) # S3 method for cmp print(x, ...) # S3 method for cmp residuals(object, type = c("raw", "quantile"), ...) # S3 method for cmp sdev(object, ...) # S3 method for cmp summary(object, ...) # S3 method for cmp vcov(object, ...)

# S3 method for zicmp AIC(object, ..., k = 2) # S3 method for zicmp BIC(object, ...) # S3 method for zicmp coef(object, ...) # S3 method for zicmp deviance(object, ...) # S3 method for zicmp equitest(object, ...) # S3 method for zicmp leverage(object, ...) # S3 method for zicmp logLik(object, ...) # S3 method for zicmp nu(object, ...) # S3 method for zicmp parametric_bootstrap(object, reps = 1000, report.period = reps + 1, ...) # S3 method for zicmp predict(object, newdata = NULL, ...) # S3 method for zicmp print(x, ...) # S3 method for zicmp residuals(object, type = c("raw", "quantile"), ...) # S3 method for zicmp sdev(object, ...) # S3 method for zicmp summary(object, ...) # S3 method for zicmp vcov(object, ...)

Arguments

formula.lambda

regression formula linked to log(lambda)

formula.nu

regression formula linked to log(nu). By default, is taken to be intercept only.

formula.p

regression formula linked to logit(p). If NULL (the default), zero-inflation term is excluded from the model.

beta.init

initial values for regression coefficients of lambda.

gamma.init

initial values for regression coefficients of nu.

zeta.init

initial values for regression coefficients of p.

...

other model parameters, such as data

object

object of type 'cmp' or 'zicmp'.

x

object of type 'cmp' or 'zicmp'.

k

Penalty per parameter to be used in AIC calculation.

newdata

New covariates to be used for prediction.

type

Type of residual to be computed.

reps

Number of bootstrap repetitions.

report.period

Report progress every report.period iterations.

Value

glm.cmp produces an object of either class 'cmp' or 'zicmp', depending on whether zero-inflation is used in the model. From this object, coefficients and other information can be extracted.

References

Kimberly F. Sellers & Galit Shmueli (2010). A Flexible Regression Model for Count Data. Annals of Applied Statistics, 4(2), 943-961.

Kimberly F. Sellers and Andrew M. Raim (2016). A Flexible Zero-Inflated Model to Address Data Dispersion. Computational Statistics and Data Analysis, 99, 68-80.