Using lme4, how does one define a full 2-factor factorial model with both factors (and their interaction) being random?
Specifically I am trying to recreate the results from Montgomery's Design of Experiments book (7th edition) example 13.2. In this example there are 2 random factors and I want to include the interaction in the model as Montgomery tests for significance in the full model first. I've tried several things but cannot recreate the results in R. I would think something like what's given below would work, but it does not.
lmer(y ~ (1|Parts) + (1|Operators) + (1|Parts:Operators))
The results I'm seeing are provided below given the model specification above. The results show that the variance component estimate for Parts:Operators is 0 suggesting that the interaction model isn’t specified correctly, or that R is not handling the model correctly.
Random effects:
Groups Name Variance Std.Dev.
Parts:Operators (Intercept) 0.00000 0.0000
Parts (Intercept) 10.25127 3.2018
Operators (Intercept) 0.01063 0.1031
Residual 0.88316 0.9398
In contrast, the results I expect to see using REML are shown below (these are the variance component estimates shown by Montgomery that I can reproduce in JMP but not R).
Random effects:
Groups Name Variance Std.Dev.
Parts:Operators (Intercept) -0.13991 0.1219
Parts (Intercept) 10.27983 3.3738
Operators (Intercept) 0.01491 0.0330
Residual 0.99167 0.1811