# \donttest{
set.seed(2508)
# Loading the data
data(phyllostomid)
phyllos_data = phyllostomid$mandible[,-1]
phyllos_tree = phyllostomid$tree
# Perfoming the P3CA on the complete dataset - Analytical solution
p3ca_phyllos = p3ca(phyllos_data, phyllos_tree, q=5, model='BM')
# plot the loadings
pcaLoadings(p3ca_phyllos)
# Test with mvgls.pca()
fit <- mvgls(phyllos_data~1, tree=phyllos_tree, model="BM")
phypca <- mvgls.pca(fit)
pcaLoadings(phypca, q=5)
# }
Run the code above in your browser using DataLab