# Body Shape Analysis (Multivariate) ----------------
if (FALSE) {
data(Pupfish)
# Although not recommended as a practice, this example will use only
# three principal components of body shape for demonstration.
# A larger number of random permutations should also be used.
Pupfish$shape <- ordinate(Pupfish$coords)$x[, 1:3]
fit <- lm.rrpp(shape ~ log(CS) + Sex, SS.type = "I",
data = Pupfish, print.progress = FALSE, iter = 499)
summary(fit, formula = FALSE)
anova(fit) # ANOVA table
# MANOVA
fit.m <- manova.update(fit, print.progress = FALSE, tol = 0.001)
summary(fit.m, test = "Roy")
summary(fit.m, test = "Wilks")
# Likelihood Ratio Test
LRT <- lr_test(fit.m)
summary(LRT)
}
Run the code above in your browser using DataLab