Is there a bug in the implementation of ZINB modeling in the fit.data function (https://github.com/biobakery/Maaslin2/blob/2c5e3eb01636aa28f4ffd23aa34bd55dd068939e/R/fit.R) used in Maaslin2?
My input for Maaslin2 is direct from Humann2 after normalizing pathway abundances across samples by cpm. I ran Maaslin2 with normalization = NULL, transform = NULL, model = ZINB, a single categorical fixed effect and random effects = NULL, so it should be calling up pscl::zeroinfl. However, I get an error message “Fitting problem for feature X, returning NA” for every single pathway feature. With the same dataset and Maaslin2 parameters, I was able to get successful model fits for a regular NB model.
Is there something I should be checking for in my dataset that might explain why a negative binomial (NB) model works, but a zero-inflated negative binomial (ZINB) model does not? I plotted a histogram of the counts for a subsample of pathway features, and there are definitely some pathway features that are zero inflated in counts.
Also, as pathway features might have different distributions (e.g. Poisson vs. NB vs. ZINB etc.), might it be possible to add a feature within Maaslin2 that runs a model comparison for each feature with output AIC/BIC values, so that the most appropriate model can be used for each tested feature?
Thanks for your help!