In this video we continue our illustration of one-way ANOVA models in R
through Example 11 in Mod13Script.R. You should open this script in
RStudio and follow along while watching. In this portion of the example
we show how the parameterization of an ANOVA model in R is controlled through the contrasts that are applied to the factor(s) in the model. We show how to query or set the contrasts for a given factor with the contrasts() function and, by using specific forms of contrasts such as those returned by contr.treatment(), contr.sum(), and other contr. functions. We also discuss the global "contrasts" option in R, which determines the contrasts that are applied to unordered and ordered factors by default. We show how to fit the one-way model under several different parameterizations by changing the contrasts applied to the treatment factor or, in the case of the cell means model, by suppressing the intercept from the model. While the parameters of the model differ in interpretation under various different parameterizations, alternative parameterizations are essentially equivalent and will give the same inferences on quantities of interest like treatment means and contrasts among treatment means.
This video is essential content for the course.