In this video we introduce analysis of variance (ANOVA) models in R. These models are typically fitted with the aov() function, which is a wrapper for the lm() function. It produces an object that has two classes: a primary class "aov" and a secondary class "lm". We discuss why this is useful. We also briefly review the one-way ANOVA model. This model can be parameterized in a variety of ways. The default parameterization in SAS, which is known as the effects version of the model, is over-parameterized. This means that it has more parameters than are really necessary given the underlying mathematical structure of the model. SAS can (and usually does) fit models in an over-parameterized form, but R does not. R always removes the over-parameterization and fits model that are "just-parameterized" (these are often called full-rank models). It does this by applying "contrasts" to parameterize the effects of any factors that are in the model. There are a variety of contrasts that can be used in R, and we mention the most important of these. They will be illustrated in Example 11 from Mod13Script.R, which will be featured in Parts 2-4 of this series of videos on ANOVA Models in R.
This video is essential content for the course.