# Simulate! Simulate! - Part 4: A binomial generalized linear mixed model

I walk through an example of simulating data from a binomial generalized linear mixed model with a logit link and then exploring estimates of over/underdispersion.

# Expanding binomial counts to binary 0/1 with purrr::pmap()

In this post I show how binomial count data can be expanded to long form binary 0/1 data. I've used this approach for simulations to explore methods for diagnosing lack of fit due to non-independence of trials in a binomial vs binary analysis.

# Lots of zeros or too many zeros?: Thinking about zero inflation in count data

When working with counts, having many zeros does not necessarily indicate zero inflation. I demonstrate this by simulating data from the negative binomial and generalized Poisson distributions. I then show one way to check if the data has excess zeros compared to the number of zeros expected based on the model.

# Simulate! Simulate! - Part 3: The Poisson edition

Extending my simulation examples into the world of generalized linear models, I simulate Poisson data to explore what a quadratic relationship looks like on the scale of the data when fitting a generalized linear model with a log link.

# Unstandardizing coefficients from a GLMM

Unstandardizing coefficients in order to interpret them on the original scale is often necessary when explanatory variables were standardized to help with model convergence when fitting generalized linear mixed models. Here I show one automated approach to unstandardize coefficients from a generalized linear mixed model fit with lme4.

# Using DHARMa for residual checks of unsupported models

Checking for model fit from generalized linear mixed models (GLMM) can be challenging. The DHARMa package helps with this by giving simulated residuals but doesn't work with all model types. I show how to use tools in DHARMa to extend it for use with unsupported models fit with glmmTMB() and zeroinfl().

#### Ariel Muldoon

I currently work as an applied statistician in aviation and aeronautics. In a previous role as a consulting statistician in academia I created and taught R workshops for applied science graduate students who are just getting started in R, where my goal was to make their transition to a programming language as smooth as possible. See these workshop materials at my website.