This function implements zero-inflated compound Poisson generalized linear models. This is similar to the zero-inflated Poisson model for count data, with the Poisson distribution replaced by the compound Poisson distribution. Specifically, the observation is allowed to com from a degenerate distribution at zero with a positive probability, in addition to the regular compound Poisson process. This latent zero-inflation part is specified using a logistic regression structure, while the compound Poisson component is modeled the same as in cpglm. Parameters are estimated by maximizing the marginal likelihood, and the variance-covariance matrix is computed numerically.
The formula specification is similar to that in zeroinfl (package pscl) except that we use || instead of | to separate the two parts of the model. For example, the formula y ~ x1 + x2 || 1 indicates that y ~ x1 + x2 is used for the compound Poison part and ~ 1 for the zero-inflation part. If the inflation part is omitted, it defaults to a model with an intercept. Offsets can be specified in both components of the model, e.g., y ~ x1 + offset(x2) | z1 + z2 + offset(z3).
More details of this model are available in the package vignettes.