data(performance)
head(performance)
# Three-way mixed ANOVA: gender and stress (between) x time (within)
perf_long <- reshape(performance, varying = c("t1", "t2"),
v.names = "score", timevar = "time", direction = "long")
summary(aov(score ~ gender * stress * factor(time) + Error(factor(id)/factor(time)),
data = perf_long))
Run the code above in your browser using DataLab