Learn R Programming

mvMORPH (version 1.2.1)

pcaShape: Projection of 2D and 3D shapes (from geometric morphometric datasets) on Principal Component Axes (PCA)

Description

The function extracts the shape changes along PCA (or phylogenetic PCA) axes computed from a linear model obtained by mvgls or mvols.

Usage

pcaShape(object, axis=1, ndim=3, spp=NULL, plot=FALSE, ...)

Value

a list with 2D or 3D coordinates for the shape projected on the selected PC axis.

Arguments

object

A model fit obtained by the mvgls or mvols function.

axis

PC axis on which the shape data will be projected.

ndim

The number of dimensions of the GMM data set (2 for 2D and 3 for 3D).

spp

Names of the species (should match names in the dataset) shape to project onto the PC axis. If null, the two extreme shapes along axis are reported.

plot

Should the projected landmarks be plotted?

...

Further options.

Author

J. Clavel

Details

The function will project the shape changes along PC axes obtained from models fit by mvgls (or mvols). This can be used to display main (evolutionary) morphological changes for 2D and 3D geometric morphometric data. See for instance Clavel et al. 2019.

References

Claude, J., 2008. Morphometrics with R. Springer Science.

Clavel, J., Aristide, L., Morlon, H., 2019. A Penalized Likelihood framework for high-dimensional phylogenetic comparative methods and an application to new-world monkeys brain evolution. Systematic Biology 68(1): 93-116.

See Also

mvgls, mvols, mvgls.pca dfaShape

Examples

Run this code
# \donttest{
data(phyllostomid)

# Fit a linear model by PL
fit <- mvgls(mandible[,-1]~grp1, data=phyllostomid, phyllostomid$tree, model="lambda", method="PL") 

# Project the mandible shape of Ametrida bat genus 
proj_shape <- pcaShape(fit, axis=1, ndim=2, spp="Ametrida", plot=TRUE)

polygon(proj_shape$Ametrida)

# }

Run the code above in your browser using DataLab