a <- read.table("http://www.stat.ucla.edu/~nchristo/statistics13/tablets_anova.txt", header=TRUE) #Create the response variable: y <- c(a$Lab1, a$Lab2, a$Lab3, a$Lab4, a$Lab5, a$Lab6, a$Lab7) #Create the 6 predictors (indicator variables): x1 <- c(rep(1, 10), rep(0,60)) x2 <- c(rep(0,10), rep(1, 10), rep(0,50)) x3 <- c(rep(0,20), rep(1, 10), rep(0,40)) x4 <- c(rep(0,30), rep(1, 10), rep(0,30)) x5 <- c(rep(0,40), rep(1, 10), rep(0,20)) x6 <- c(rep(0,50), rep(1, 10), rep(0,10))