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)


Linear mixed-effects model fit by maximum likelihood

Data: Data

AIC BIC logLik


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,


1 Answer 1


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.

If you want the conditional AIC that focuses on selecting both the fixed and random effects, check the cAIC4 package.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.