Skip to content
Prev 76892 / 398503 Next

Doubt about nested aov output

Thank you for your response.  The single response/observer most probably
explains
the complaints that lmer was giving for my example.  Maybe this small
modification
provides a better example and corrects a more serious error in my previous
post:

library(lme4)
y<-rnorm(30)
cond <- rep(gl(3,5,15), 2)
obs<-rep(gl(15,1), 2)
subj<-rep(gl(5,1,15), 2)
dd<-data.frame(y=y,cond=cond,obs=obs,subj=subj)

l1 <- lmer(y~cond + (1|cond:obs), data=dd)
l2 <- lmer(y~cond + (1|cond:subj), data=dd)
l3 <- lmer(y~cond + (1|obs), dd)

Understanding the notation is often about 99% of the job, and it is
very helpful to see multiple ways to accomplish the same thing.