data(TIPI)
# fit an mlm
tipi.mlm <- lm(cbind(Extraversion, Neuroticism, Conscientiousness, Agreeableness, Openness)
~ engnat + gender + education, data = TIPI )
car::Anova(tipi.mlm)
heplot(tipi.mlm, fill=TRUE, fill.alpha=0.1)
pairs(tipi.mlm, fill=TRUE, fill.alpha=0.1)
# candisc works best for factors with >2 levels
library(candisc)
tipi.can <- candisc(tipi.mlm, term="education")
tipi.can
heplot(tipi.can, fill=TRUE, fill.alpha=0.1,
var.col = "darkred", var.cex = 1.5, var.lwd = 3)
Run the code above in your browser using DataLab