# GAMM with zero-inflated data

Is it possible to fit a GAMM(Generalized Additive Mixed Model) for zero-inflated data in R?

If not, is it possible to fit a GAM(Generalized Additive Model) for zero-inflated data with a negative binomial or quasi Poisson distribution in R? (I found COZIGAM::zigam and mgcv:ziP functions for Poisson distribution)

In addition to mgcv and its zero-inflated Poisson families (ziP() and ziplss()), you might also look at the brms package by Paul-Christian Bürkner. It can fit distribution models (where you model more than just the mean, in your case the zero-inflation component of the model can be modelled as a function of covariates just like the count function).
You can include smooths in any of the linear predictors (for the mean/count, zero-inflation part, etc) via s() and t2() terms for simple 1-d or isotropic 2-d splines, or anisotropic tensor product splines respectively. It has support for zero-inflated binomial, Poisson, negative binomial, and beta distributions, plus zero-one-inflated beta distributions. It also has hurdle models for Poisson and negative binomial responses (where the count part of the model is a truncated distribution so as to not produce further zero counts).
The glmmTMB package offers this and is described in a recent bioRxiv paper: Brooks et al. (2017). Modeling Zero-Inflated Count Data with glmmTMB, bioRxiv, doi:10.1101/132753.
Gavin Simpson also has a nice blog post that compares glmmTMB with mgcv for this purpose: Fitting count and zero-inflated count GLMMs with mgcv.
• Thanks also for pointing to brms which indeed is very nice and flexible. Together with Niki Umlauf I have also been planning to write some count families for bamlss to get some further flexible regression features... but so far we didn't get round to count data distributions. – Achim Zeileis Aug 3 '17 at 18:14