1 Initialize R

Use the following commands to initialize R. The commands set R to define effects using the sum-to-zero constraint and loads two data frames, df0 and df1, that we’ll analyze in the following sections.

options(contrasts=c("contr.sum","contr.poly") )  # set definition of contrasts
load(url("http://pnb.mcmaster.ca/bennett/psy710/datasets/RLab06b.rda") )

2 Three-Way ANOVA

An experiment used a factorial design to analyze the effects of three factors A, B, and C on a dependent variable, Y. The data are stored in the data frame df0. Use df0 to answer the following questions. When analyzing simple interaction effects or simple main effects, you do not need to recalculate \(F\) and \(p\) values using MS-error and df-error from the original ANOVA.

  1. Confirm that the data are balanced.

  2. Use ANOVA to evaluate the all of the main effects and interactions. List the ANOVA table.

  3. The 3-way interaction is significant. What null hypothesis is evaluated by this \(F\) test?

  4. Does it make sense to analyze the sub-effects of the main effects of A and B, or to decompose/analyze the A:B interaction? Why or why not?

  5. Plot the 3-way interaction and come up with an idea about why it is significant.

  6. Evaluate the simple A:C interaction for each level of B. For each analysis, calculate a measure of effect size or association strength for AxC. For each analysis, if the simple interaction is significant, then evaluate the simple simple main effect of C at each level of A. If the simple interaction is not significant, then evaluate the simple main effects of A and C at each level of B.

3 Two-Way ANOVA

An experiment used a factorial design to evaluate the effects of two drugs, A and B, on the dependent variable Y. The levels of A and B were drug absent (a0 & b0) and drug present (a1 & b1), condition a0b0 is a baseline (placebo) condition. The data are stored in the data frame df1.

  1. Use ANOVA to evaluate the effects of A and B. List the ANOVA table.

  2. Evaluate the homogeneity of variance assumption.

  3. Evaluate the normality assumption.

  4. The experimenters hypothesized that both drugs had to be present to have an effect on Y. Perform an analysis that follows up your ANOVA to evaluate this hypothesis.