This function performs phylogenetic PCA (e.g., Revell 2009; Evolution).
phyl.pca(tree, Y, method="BM", mode="cov", ...)
# S3 method for phyl.pca
biplot(x, ...)
phylogeny as an object of class "phylo"
.
data matrix with traits in columns.
method to obtain the correlation structure: can be "BM"
or "lambda"
.
is the mode for the PCA: can be "cov"
or "corr"
.
object of class "phyl.pca"
for biplot.phyl.pca
.
for S3 plotting method biplot.phyl.pca
, other arguments to be passed to biplot
.
An object of class "phyl.pca"
consisting of a list with some or all of the following components:
diagonal matrix of eigenvalues.
matrix with eigenvectors in columns.
matrix with scores.
matrix with loadings.
fitted value of lambda (method="lambda"
only).
log-likelihood for lambda model (method="logL"
only).
If method="lambda"
\(\lambda\) is optimized on the interval (0,1) using optimize
. Optimization method can be set using the option opt
which can take values "ML"
, "REML"
, or "fixed"
. If the last of these is selected than the user should also specify a value of \(\lambda\) to use via the argument lambda
.
S3 methods (print
, summary
, and biplot
) are modified from code provided by Joan Maspons and are based on the same methods for objects of class "prcomp"
. Function biplot
now permits the argument choices
to be supplied, which should be a vector of length two indicated the two PC axes to be plotted.
Revell, L. J. (2009) Size-correction and principal components for interspecific comparative studies. Evolution, 63, 3258-3268.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.