# How can we calculate AIC from a negative binomial GLMM?

Our problem here described is to calculate AIC from a GLMM negbin. Our data compose by 2 Categorical variables (Yes/Not), 3 Numerical variables and our random factor, all without any NA. We want to create a GLMM model with negative binomial family and this model calculates AIC and BIC as NA, but calculate the rest of the model values. In R:

>model<-glmmPQL(X~Categorical1*Categorical2+Numerical1+Numerical2+Numerical3,random=~1|Random1,family=negative.binomial(theta = 1234, link = "log"),data=Data)

>summary(model)

Linear mixed-effects model fit by maximum likelihood

Data: Data

AIC BIC logLik

NA NA NA

We tried using in R: AIC(model), AIC(logLik(model)), BIC(model), BIC(logLik(model)) & extractAIC(model) with NA as a result (in the case of extractAIC we obtain 9 NA). How can we calculate this AIC?

Thank you,

If you want the marginal AIC (i.e., for the implied marginal model that focuses on the fixed effects alone), you can fit the model with the GLMMadaptive package that provides this in the output of the summary() method. E.g., check this example.