Learn R Programming

mcount (version 1.0.0)

mzip: Estimating marginalized zero-inflated Poisson model

Description

Function to estimate a marginalized zero-inflated Poisson model

Usage

mzip(formula, data)

Arguments

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. A typical formula has the form response ~ terms where response is the count response vector and terms is a series of terms that predict response. For example, formula = y ~ x1 + x2 + x3. Do not write intercept in the formula; intercept will be automatically added in model fitting.

data

a data frame containing variables in the model.

Value

Suffix _zero corresponds to the parameters associated with the structrual zero rate part of a model. Suffix _mean corresponds to the parameters associated with the overall mean, which evaluate the effects of covariates on the overall mean.

Details

Function returns an object of class "mle2" from bbmle R package. Apply summary function to the resulting object from the function to obtain more estimation information.

References

Long, D. L., Preisser, J. S., Herring, A. H., & Golin, C. E. (2014). A marginalized zero<U+2010>inflated Poisson regression model with overall exposure effects. Statistics in Medicine, 33(29), 5151-5165.

Examples

Run this code
# NOT RUN {
head(dat.pfi)

#Fit a marginalized zero-inflated Poisson model
res = mzip(formula = y ~ m0 + int_PF + year_new + race_new, data = dat.pfi)

#Obtain estimation results
bbmle::summary(res)
# }

Run the code above in your browser using DataLab