dfaShape {mvMORPH} | R Documentation |
Projection of 2D and 3D shapes (from geometric morphometric datasets) on Discriminant axes
Description
The function extracts the shape changes along discriminant axes computed by a DFA (mvgls.dfa
).
Usage
dfaShape(object, reference, axis=1, ndim=3, spp=NULL, scaling=1, plot=FALSE, ...)
Arguments
object |
A discriminant analysis obtained by the |
reference |
The reference shape used to compare the deformations. Usually the mean shape. |
axis |
The discriminant axis on which morphological changes are 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 |
scaling |
An arbitrary factor used to multiply the effects (for better visualization) |
plot |
Should the projected landmarks be plotted? |
... |
Further options. |
Details
The function will project the shape changes along discriminant axes obtained from a DFA by mvgls.dfa
. This can be used to display morphological changes (for 2D and 3D geometric morphometric data) that best separate individuals from distinct groups.
Value
a list with 2D or 3D coordinates for the shape projected on the selected PC axis.
Author(s)
J. Clavel
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.dfa
pcaShape
Examples
data(phyllostomid)
# Fit a linear model by PL
fit <- mvgls(mandible[,-1]~grp1, data=phyllostomid, phyllostomid$tree, model="lambda", method="PL")
# Discriminant analysis
da <- mvgls.dfa(fit)
# Project the mandible shape extremes on the first discriminant axe
proj_shape <- dfaShape(da, reference=coef(fit), axis=1, ndim=2, plot=TRUE)
polygon(proj_shape$min)
polygon(proj_shape$max, border="red")