data(LearnDis)
str(LearnDis)
ld.mod <- lm(cbind(WRAT_R, WRAT_A) ~ Disability * Treatment, data = LearnDis)
car::Anova(ld.mod)
heplot(ld.mod, fill = TRUE, fill.alpha = 0.1)
# Roy-Bargmann stepdown: does WRAT-A add anything to WRAT-R for the
# Treatment effect?
# Needs Type III SS, since the WRAT_R covariate breaks the balanced
# factorial's orthogonality:
options(contrasts = c("contr.sum", "contr.poly"))
step2.mod <- lm(WRAT_A ~ WRAT_R + Disability * Treatment, data = LearnDis)
car::Anova(step2.mod, type = "III")
Run the code above in your browser using DataLab