2 ^ 3 Factorial Design

A short description of the post.

Kris Sankaran true
10-28-2021

Readings 6.3 - 6.4, Rmarkdown

  1. How can we generalize the \(2^2\) analysis so that we can do studies that inspect many factors simultaneously (all at two levels each)? For now, we’ll analyze the 3 factor case (the \(2^3\) design), but with an eye out for more general patterns

  2. For the \(2^3\) design, we have 8 factor configurations

    • Visualize as corners of a cube
    • Call the third factor \(C\).

  1. The example below reads in a dataset with 3 factors. We can use facet_grid to see effects across all 8 configurations.
library(readr)
library(dplyr)
plasma <- read.table("https://uwmadison.box.com/shared/static/f3sggiltyl5ycw1gu1vq7uv7omp4pjdg.txt", header = TRUE)
ggplot(plasma) +
  geom_point(aes(A, Rate)) +
  facet_grid(B ~ C)

Effect Estimates

  1. Our table notation can be extended to deal with all 8 corners of the cube.
A B C label
- - - (1)
+ - - a
- + - b
- - + c
+ + - ab
+ - + ac
- + + bc
+ + + abc
  1. The main effect estimates can be made by subtracting the + from the - corners. Equivalently, this can be viewed as the difference in averages,

    • when the factor is on vs. off
    • between one face of the cube and its opposite
  2. For example, to estimate the main effect of \(A\), we can use, \[A = \frac{1}{2^3 n}\left[\left(a + ab + ac + abc\right) - \left(\left(1\right) + b + c + bc\right)\right]\]

  3. To estimate interactions, we compare how the average effects of a variable change when we condition on the value of another variable. For example, for the interaction \(AB\), notice that

B Average A Effect
+ \(\frac{1}{2^3 n}\left[\left(abc - bc\right) + \left(ab - b\right)\right]\)
- \(\frac{1}{2^3 n}\left[\left(ac - c\right) + \left(a - \left(1\right)\right)\right]\)
which inspires the definition,

\[ AB = \frac{1}{2^3 n}\left[abc - bc + ab - b - ac + c - a + \left(1\right)\right] \]

  1. Notice that the associated contrast can be obtained by multiplying the columns in the table above.
display(readImage("https://uwmadison.box.com/shared/static/wwsniua1ce0q376oy2ffrtzf4ivzup99.png"))
display(readImage("https://uwmadison.box.com/shared/static/hapjw92oqij5oiyddt29nvtq6y1xzxxu.png"))

A B C AB label
- - - + (1)
+ - - - a
- + - - b
- - + + c
+ + - + ab
+ - + - ac
- + + - bc
+ + + + abc

We won’t prove why this works, but you can use it as a device for avoiding having to memorize everything. The three-way interaction is defined as the change in two-way interactions across the two values for the third variable. It’s contrast can be derived also by multiplying the relevant columns from the table above.