# sleep data example, p 97
dat <- c(0.7, -1.6, -0.2, -1.2, -0.1, 3.4, 3.7, 0.8, 0, 2,
1.9, 0.8, 1.1, 0.1, -0.1, 4.4, 5.5, 1.6, 4.6, 3.4,
1.5, 1.4, 0.0, -0.7, 0.5, 5.1, 5.7, 1.5, 4.7, 3.5)
treat <- gl(3,10,30)
patients <- gl(10,1,30)
contrast1 <- c(-1, 0, 1) # linear
contrast2 <- c(-2, 1, 1) # 1st vs treatments 2 & 3
m=L_1way_RM_ANOVA(dat, treat, patients, correct=1, contrast1, contrast2)
m
Run the code above in your browser using DataLab