Get startedGet started for free

The factorial ANOVA

Now that you have tested the homogeneity of variance assumption, it is time to run the factorial ANOVA using the following notation:

aov(dependent_variable ~ independent_var1 * independent_var2)

The multiplication symbol in the formula ensures that both the main effect of the two independent variables as well as their interaction effect are taken into account in the ANOVA analysis.

This exercise is part of the course

Intro to Statistics with R: Analysis of Variance (ANOVA)

View Course

Exercise instructions

  • Use the function aov() to perform a factorial ANOVA on ab . Assign the result to ab_model.
  • Apply the summary() function to ab_model to get the ANOVA summary table. Study the table closely.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

## The data frame ab is preloaded in your workspace

# Factorial ANOVA
ab_model <- ___

# Get the summary table
Edit and Run Code