data(Skulls)
sk.rmod <- robmlm(cbind(mb, bh, bl, nh) ~ epoch, data=Skulls)
plot(sk.rmod, col=Skulls$epoch, segments=TRUE)
axis(side=3, at=15+seq(0,120,30), labels=levels(Skulls$epoch), cex.axis=1)
# Pottery data
data(Pottery, package = "carData")
pottery.rmod <- robmlm(cbind(Al,Fe,Mg,Ca,Na)~Site, data=Pottery)
plot(pottery.rmod, col=Pottery$Site, segments=TRUE)
# SocialCog data
data(SocialCog)
SC.rmod <- robmlm(cbind( MgeEmotions, ToM, ExtBias, PersBias) ~ Dx,
data=SocialCog)
plot(SC.rmod,
col=SocialCog$Dx, segments=TRUE)
# label the groups
ctr <- split(seq(nrow(SocialCog)), SocialCog$Dx) |> lapply(mean)
axis(side = 3, at=ctr, labels = names(ctr), cex.axis=1.2)
# use the groups arg
colors = c("red", "darkgreen", "blue")
ids <- plot(SC.rmod,
groups=SocialCog$Dx,
col = colors,
pch = 15:17,
segments=TRUE)
# the cases labeled and their weights
ids
Run the code above in your browser using DataLab