# 5.7 - Introduction to Mixed Models

5.7 - Introduction to Mixed Models

Treatment designs can be comprised of both fixed and random effects. When we have this situation the design is referred to as a mixed model. In my experience with experimental designs I have found that mixed models are by far the most commonly encountered designs. The three situations we now have are often referred to as Model I (fixed effects only), Model II (random effects only) and Model III (mixed) ANOVAs.

### Factorial

In the simplest case of a mixed model, we may have two factors, A and B, in a factorial design in which factor A is a fixed effect and factor B is a random effect. In this case, we have the following ANOVA:

 Source EMS A $$\sigma^2+nb\frac{\sum\alpha_{i}^{2}}{a-1}+n\sigma_{\alpha\beta}^{2}$$ B $$\sigma^2+na\sigma_{\beta}^{2}$$ A × B $$\sigma^2+n\sigma_{\alpha\beta}^{2}$$ Error $$\sigma^2$$ Total

The A × B interaction term is a random effect. The Rule is that a random effect crossed with a fixed effect is also a random effect.

The F tests are set up based on the EMS column above and we can see that we have to use different denominators in testing significance for the various sources in the ANOVA table:

 Source EMS F A $$\sigma^2+nb\frac{\sum\alpha_{i}^{2}}{a-1}+n\sigma_{\alpha\beta}^{2}$$ MSA / MSAB B $$\sigma^2+na\sigma_{\beta}^{2}$$ MSB / MSE A × B $$\sigma^2+n\sigma_{\alpha\beta}^{2}$$ MSAB / MSE Error $$\sigma^2$$ Total

As a reminder, the null hypothesis for a fixed effect is that the $$\alpha_i$$'s are equal, whereas the null hypothesis for the random effect is that the $$\sigma_{\beta}^{2}$$'s are equal to zero.

Note! that the denominator for F test for the main effect of factor A is now the MS for the A × B interaction. For Factor B and the A × B interaction, the denominator is the MSE.

### Nested

In the case of a nested treatment design, where A is a fixed effect and B(A) is a random effect, we have the following:

 Source EMS A $$\sigma_{\epsilon}^{2}+n\sigma_{\beta(\alpha)}^{2}+bn\frac{\sum\alpha_{i}^{2}}{a-1}$$ B(A) $$\sigma_{\epsilon}^{2}+n\sigma_{\beta(\alpha)}^{2}$$ Error $$\sigma_{\epsilon}^{2}$$ Total

Here is the same table with the F statistics added. Note that the denominators for the F-test are different.

 Source EMS F A $$\sigma_{\epsilon}^{2}+n\sigma_{\beta(\alpha)}^{2}+bn\frac{\sum\alpha_{i}^{2}}{a-1}$$ MSA / MSB(A) B(A) $$\sigma_{\epsilon}^{2}+n\sigma_{\beta(\alpha)}^{2}$$ MSB(A) / MSE Error $$\sigma_{\epsilon}^{2}$$ Total

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility