str(Hernior)
mod <- lm(cbind(leave, nurse, los) ~ age + sex + pstat + build + cardiac, data=Hernior)
Anova(mod, test="Roy") # actually, all tests are identical
clr <- c("red", "darkgray", "blue", "darkgreen", "magenta", "brown", "black")
heplot(mod, col=clr)
pairs(mod, col=clr)
# Add ellipse to test all 5 regressors simultaneously
hyp <- list("Regr" = c("age", "sexm", "pstat", "build", "cardiac"))
pairs(mod, hypotheses=hyp, col=clr)Run the code above in your browser using DataLab