In a balanced repeated measures one-way ANOVA, we compare the true averages of a response variable across time points. Are the results about the time effects equivalent to those from a classic two-way ANOVA with "time" and "subject id" as factors? If yes, do you know a good reference about it?
Example in R (20 subject ids with one value for each of the three time points):
# Data generation
set.seed(2)
t0 <- rnorm(20)
t1 <- rexp(20) + t0 / 4
t2 <- runif(20) + t1 / 2
response <- c(t0, t1, t2)
time <- factor(rep(1:3, each = 20))
id <- factor(rep(1:20, times = 3))
#___________________________________________________________
# Two-way between-subject ANOVA
drop1(lm(response ~ time + id), test = "F")
# Output -> p-value of any time effect is 0.0013734
Df Sum of Sq RSS AIC F value Pr(>F)
<none> 21.038 -18.8811
time 2 8.723 29.761 -2.0690 7.8780 0.0013734 **
id 19 39.129 60.167 6.1669 3.7199 0.0002787 ***
#___________________________________________________________
# Now the repeated-measures ANOVA
summary(aov(response ~ time + Error(id)))
# Output -> p-value also 0.00137
Error: id
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 19 39.13 2.059
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
time 2 8.723 4.361 7.878 0.00137 **
Residuals 38 21.038 0.554
As far as I know, the methods provide also similar (wrong) p-values in the unbalanced case.
time
effect will differ). $\endgroup$