...

/

Understanding Mixed-effects Models

Understanding Mixed-effects Models

Get introduced to mixed-effects models.

Mixed-effects models, also called random-effects models, are a way to control for variation in our data that we’re aware of but aren’t interested in. In essence, it allows us to partition variance in the data into two groups: fixed effects and random effects. The fixed effects are factors that we’re interested in studying, while the random effects are the sources of variation that may be important but don’t interest us.

One useful way to think about the difference between fixed and random effects is that fixed effects affect the mean of our data. In contrast, random effects primarily affect the variance of our data. Thus, by accounting for the random effects, we can reduce the noise in our data and get a clearer picture of the effects we’re interested in.

One of the most important capabilities of mixed models is that they allow us to use data from nonindependent observations. For example, we’ve used data that was averaged for each mesocosm—for example, the mean time to metamorphosis. Each individual in a given tank isn’t independent of all the other individuals in the same tank. They had the same developmental environment. However, with mixed models, we can use all the data from every individual while still controlling that the metamorphs were raised in common environments.

What is a mixed-effects model?

Mixed-effects models are a form of what’s called a hierarchical model. Essentially, instead of just calculating a single regression, the model builds regressions for each level of our random effects. Think of them as submodels. These submodels are pooled together to build a general effect—that is, the fixed effect. The variation between the submodels (the random effect) is accounted for while preserving and potentially clarifying the fixed effect.

It’s essential to recognize that this is a mathematically ...