Algorithms for fitting standard error adjusted adaptive LASSO for both zero-inflated Poisson (ZIP) and zero-inflated negative binomial (ZINB) regression models. AMAZonn relies on an efficient coordinate descent algorithm embedded within an EM algorithm by imposing standard error adjusted adaptive
AMAZonn
can be installed using the following command (execute from within a fresh R session):
install.packages("devtools")
devtools::install_github("himelmallick/AMAZonn")
library(AMAZonn)
AMAZonn(formula, data, family, ...)
- formula symbolic description of the model, similar to that in
zeroinfl
function in the R packagepscl
with | to separate the count and zero submodels - data: an optional data frame (or object coercible by as.data.frame to a data frame) containing the variables in the model
- family: character specification of the count model family with options
poisson
,negbin
, andgeometric
(a log link is always used) - ... other arguments that can be passed from the
zipath
function in the R packagempath
(Wang et al., 2015)
The function AMAZonn
returns a list of following components:
- coefficients: a list with elements
count
andzero
containing the coefficients from the respective submodels - ... other components similar to
zipath
function in the R packagempath
(Wang et al., 2015)
library(zic)
data(docvisits)
dt <- docvisits[, -(2:3)]
tmp <- model.matrix(~age30 * health + age35 * health +
age40 * health + age45 * health + age50 * health +
age55 * health + age60 * health, data = dt)[, -(1:9)]
dat <- cbind(dt, tmp)
AMAZonn Estimates
fit.zonn <- AMAZonn(docvisits ~ . | ., data = dat, family = "negbin")
rm(list="param")
minBic <- which.min(BIC(fit.zonn))
coef(fit.zonn, minBic)
cat("theta estimate", fit.zonn$theta[minBic])
Compute standard errors of coefficients and theta (the last one for theta).
se(fit.zonn, minBic, log = FALSE)
Compute AIC, BIC, log-likelihood values of the selected model.
AIC(fit.zonn)[minBic]
BIC(fit.zonn)[minBic]
logLik(fit.zonn)[minBic]
Wang, Z., Ma, S., and Wang, C.Y. (2015). Variable Selection for Zero-inflated and Overdispersed Data with Application to Health Care Demand in Germany. Biometrical Journal 57(5):867-884.
Banerjee, P., Garai, B., Mallick, H., Chowdhury, S., Chatterjee, S. (2018). A Note on the Adaptive LASSO for Zero-inflated Poisson Regression. Journal of Probability and Statistics, 2834183.