Where \(\epsilon_{ij}\) is the random error
chemical <- c(rep(1,5),rep(2,5),rep(3,5),rep(4,5))
bolts <- c(rep(seq(1,5),4))
obs <- c(73,68,74,71,67,73,67,75,72,70,75,68,78,73,68,73,71,75,75,69)
chemical <- as.fixed(chemical)
bolts <- as.fixed(bolts)
model <- lm(obs~chemical+bolts)
gad(model)
## Analysis of Variance Table
##
## Response: obs
## Df Sum Sq Mean Sq F value Pr(>F)
## chemical 3 12.95 4.317 2.3761 0.1211
## bolts 4 157.00 39.250 21.6055 2.059e-05 ***
## Residual 12 21.80 1.817
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1