A short description of the post.
Readings 14.2, 14.3, Rmarkdown
Nested designs are versatile; they can be applied to many levels of nesting and in conjunction with factors.
Almost the same methodology used in 2-level nested designs carries over to more general levels. Graphically, the tree of effects grows deeper. Since there are more parameters at deeper levels of nesting, it is often a good idea to fit those parameters using random effects.
Nested terms can be included in standard factorial models. Consider the following setting (Example 14.2),
An industrial engineering is optimizing the assembly time of an electronic device.
There are different possible layouts and fixtures of the circuit boards which may influence the time to assembly.
The experiment must be run across factories. The operators who do the actual assembly will differ depending on layout.
####(readImage("https://uwmadison.box.com/shared/static/ijhv501h8c07j2xvonxcsg4rkhjoh840.png"))
The operator effect is nested within the layout effect. It should also be treated as a random effect, because we want to understand variation across all possible operators, when choosing a particular layout and fixture design. Therefore, a reasonable model is
\[\begin{align*} y_{ijkl} &= \mu + \alpha_{i} + \beta_{j} + \tau_{k\left(j\right)} + \left(\alpha\beta\right)_{ij} + \left(\alpha \tau\right)_{ik\left(j\right)} \end{align*}\]
\(\alpha_i\): The fixture effect
\(\beta_j\): The layout effect
\(\tau_{k\left(j\right)}\): The operator random effect.
\(\left(\alpha\beta\right)_{ij}\): An interaction effect between fixtures and layouts
\(\left(\alpha\tau\right)_{ik\left(j\right)}\): A random interaction effect between the fixture and the operator.
Since this model has both random and fixed effect terms, it is called a mixed effects model. It is fit below.
ggplot(assembly) +
geom_point(aes(x = Operator, y = Time)) +
facet_grid(Fixture ~ Layout, scale = "free_x")
Error: Layout
Df Sum Sq Mean Sq
Layout 1 4.083 4.083
Error: Layout:Operator
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 6 71.92 11.99
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Fixture 2 82.79 41.40 12.232 8.84e-05 ***
Fixture:Layout 2 19.04 9.52 2.813 0.0732 .
Residuals 36 121.83 3.38
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
The ANOVA table suggests that layout doesn’t have much of an effect, but that certain fixtures are easier to assemble than others. The fact that there is an interaction between fixtures and operators suggests that the operators who are much worse at some fixtures than others could be retrained.