...

/

Introduction to Multi-way ANOVA

Introduction to Multi-way ANOVA

Get introduced to the multi-way ANOVA.

Getting started

The model commonly referred to as a linear model, or lm(), is one of the most flexible and valuable models in statistics. We’ll discuss generalized linear models (GLMs) in upcoming chapters. These types of models allow us to analyze non-normally distributed data. Before we get started, let’s load all the packages we need for this lesson. This is something we like to do at the head of any script file.

library(dplyr)
library(ggplot2)
library(tidyr)
library(car)
library(emmeans)
library(multcomp)
library(cowplot)

We can begin now that all the necessary packages have been loaded.

Multi-way Analysis of Variance—ANOVA

The linear model we ran in the previous chapter, lm1, had a single categorical predictor. This type of model is also called a one-way Analysis of Variance (ANOVA). But what about when we have multiple categorical predictors that may interact with one another? This is generally referred to as a multi-way ANOVA. A model with two predictors would be a two-way ANOVA, a model with three predictors would be a three-way ANOVA, and so on. Okay, but what does it mean for predictors to interact?

What is an interaction?

In a simple sense, it means that the effect of one predictor depends on another predictor in the same model. With a predator-prey system like the tadpole data we’re analyzing, we could imagine that having high or low resource levels available might greatly influence the prey size in the absence of predators. Still, perhaps the presence of predators causes the prey to all hide and eat less, so having extra food available doesn’t matter. Thus, the effect of resources would depend on, or interact with, the presence or absence of predators.

Note: It should be clear how this ...