math.teach <- data.frame(
teacher = factor(rep(1:2, c(3, 6))),
satis = c(1, 3, 2, 4, 6, 6, 5, 5, 4),
know = c(3, 7, 2, 6, 8, 8, 10, 10, 6))
(m1 <- with(math.teach,
HotellingsT2Test(cbind(satis, know) ~ teacher))
)
Run the code above in your browser using DataLab