# 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.

# 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.

# The log-0 problem: analysis strategies and options for choosing c in log(y + c)

Analyzing positive data with 0 values can be challenging, since a direct log transformation isn't possible. I discuss some of the things to consider when deciding on an analysis strategy for such data and then explore the effect of the value of the constant, c, when using log(y + c) as the response variable.

# Getting started simulating data in R: some helpful functions and how to use them

Here is the written version of a talk I gave at the Eugene R Users Group.

# 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.

# A closer look at replicate() and purrr::map() for simulations

In this post I delve into the details of the R functions I've been using in my simulation examples, focusing on the replicate() function and the map family of functions from the purrr package. I spend a little time showing the parallels between the replicate() function and a for() loop.

# Simulate! Simulate! - Part 2: A linear mixed model

In my second simulation example I show how to simulate data from a basic two-level hierarchical design. I go on to explore how well the random effects variance component is estimated for different sample sizes.

# Simulate! Simulate! - Part 1: A linear model

Where I discuss simulations, why I love them, and get started on a simulation series with a simple two-group linear model simulation.

# 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 a consulting statistician, advising natural and social science researchers on statistics, statistical programming, and study design. I create and teach R workshops for applied science graduate students who are just getting started in R, where my goal is to make their transition to a programming language as smooth as possible. See my workshop materials at my website.