For teaching purposes I want to show the similarity between a 3-way repeated measures ANOVA aov(y ~ A*B*C + Error(Subject/(A*B*C)), data)
and the corresponding lmm assuming compound symmetry in R.
From this response I found out that the corresponding lme4::lmer
model is
lmer(y ~ A*B*C + (1|Subject) + (1|A:Subject) + (1|B:Subject) + (1|C:Subject)
+ (1|A:B:Subject) + (1|A:C:Subject) + (1|B:C:Subject), data))
How can I fit this model with nlme::lme
assuming compound symmetry?