Factorial designs with arbitrary numbers of factors
\[y_{ijkl} = \mu + \tau_i + \beta_j + \gamma_k + \left(\tau \beta\right)_{ij} + \left(\tau \gamma\right)_{ik} + \left(\beta \gamma\right)_{jk} + \left(\tau \beta \gamma\right)_{ijk} + \epsilon_{ijkl}\]
where \(\epsilon_{ijkl} \sim N\left(0, \sigma^2\right)\). Suppose that the first, second, and third factors have \(a, b\), and \(c\) levels, respectively.
We can calculate sum-of-squares terms for each of the terms. Notice that there are also certain symmetries in the degrees of freedom,
What do you think is the pattern for arbitrary \(K\).
For testing, we will compare these sums-of-squares to \(SS_E\), which has \(abc(n - 1)\) degrees of freedom. The \(F\)-statistics for any of the terms above can be found by dividing the associate mean squares against \(MS_E\). Hence, we can test whether any of the terms is nonzero for at least one value of its index.
plasma <- read.table("https://uwmadison.box.com/shared/static/f3sggiltyl5ycw1gu1vq7uv7omp4pjdg.txt", header=TRUE)
ggplot(plasma) +
geom_point(aes(A, Rate)) +
facet_grid(B ~ C)
*
syntax refers to all main and interaction effects derived from the linked variables. Df Sum Sq Mean Sq F value Pr(>F)
A 1 41311 41311 18.339 0.002679 **
B 1 218 218 0.097 0.763911
C 1 374850 374850 166.411 1.23e-06 ***
A:B 1 2475 2475 1.099 0.325168
A:C 1 94403 94403 41.909 0.000193 ***
B:C 1 18 18 0.008 0.930849
A:B:C 1 127 127 0.056 0.818586
Residuals 8 18020 2253
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1