Description Usage Arguments Details Value References Examples
The function glm.izip
is used to fit an interpretable zero-inflated Poisson
generalized linear model with a log-link.
1 2 3 4 5 6 7 8 9 |
formula |
an object of class 'formula': a symbolic description of the model to be fitted to the mean via log-link. |
data |
an optional data frame containing the variables in the model |
ref.lambda |
the rate of a Poisson distribution that baseline zero-inflated odds based on. |
offset |
this can be used to specify an a priori known component to be included |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
contrasts |
optional lists. See the contrasts.arg of model.matrix.default. |
na.action |
a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. The ‘factory-fresh’ default is na.omit. Another possible value is NULL, no action. Value na.exclude can be useful. |
Fit an interpretable zero-inflated Poisson regression using maximum likelihood estimation.
The model is
Y_i ~ ZIP_{ν}(μ_i | λ = λ_{ref}),
where
E(Y_i) = μ_i = exp(x_i^T β),
x_i are some covariates.
ν ≥ 0 is the baseline zero-inflated odds relative to a Poisson with rate λ_{ref}.
A fitted model object of class izip
similar to one obtained from glm
or glm.nb
.
The function summary
(i.e., summary.izip
) can be used to obtain
and print a summary of the results.
The functions plot
(i.e., plot.izip
) and
autoplot
can be used to produce a range
of diagnostic plots.
The generic assessor functions coef
(i.e., coef.izip
),
logLik
(i.e., logLik.izip
)
fitted
(i.e., fitted.izip
),
nobs
(i.e., nobs.izip
),
AIC
(i.e., AIC.izip
) and
residuals
(i.e., residuals.izip
)
can be used to extract various useful features of the value
returned by glm.izip
.
An object class 'izip' is a list containing at least the following components:
coefficients |
a named vector of coefficients |
stderr |
approximate standard errors (using observed rather than expected information) for mean coefficients |
residuals |
the response residuals (i.e., observed-fitted) |
fitted_values |
the fitted mean values |
rank |
the numeric rank of the fitted linear model for mean |
linear_predictors |
the linear fit for mean on log scale |
df_residuals |
the residuals degrees of freedom |
df_null |
the residual degrees of freedom for the null model |
null_deviance |
The deviance for the null model. The null model will include only the intercept. |
deviance; residual_deviance |
The residual deviance of the model |
y |
the |
X |
the model matrix for mean |
model |
the model frame for regression |
call |
the matched call |
formula |
the formula supplied for regression |
terms |
the |
data |
the |
offset |
the |
Huang, A. and Fung, T. (2020). Zero-inflated Poisson exponential families, with applications to time-series modelling of counts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## article production by graduate students in
## biochemistry PhD programs of Long (1990, 1997)
data(bioChemists)
M_bioChem <- glm.izip(art ~ ., data = bioChemists)
summary(M_bioChem)
plot(M_bioChem) # or autoplot(M_bioChem)
## Root counts for propagated columnar apple shoots of
## Ridout, Hinde & Demetrio (1998).
data(appleshoots)
M_shoots <- glm.izip(roots ~ 1 +
1 + factor(photo) * factor(bap),
data = appleshoots
)
summary(M_shoots)
plot(M_shoots) # or autoplot(M_bioChem)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.