phyl.pca {phytools} | R Documentation |
This function performs phylogenetic PCA (e.g., Revell 2009; Evolution).
phyl.pca(tree, Y, method="BM", mode="cov", ...) ## S3 method for class 'phyl.pca' biplot(x, ...)
tree |
phylogeny as an object of class |
Y |
data matrix with traits in columns. |
method |
method to obtain the correlation structure: can be |
mode |
is the mode for the PCA: can be |
x |
object of class |
... |
for S3 plotting method |
If method="lambda"
λ is optimized on the interval (0,1) using optimize
. 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.
An object of class phyl.pca
which is a list with some or all of the following components:
Eval |
diagonal matrix of eigenvalues. |
Evec |
matrix with eigenvectors in columns. |
S |
matrix with scores. |
L |
matrix with loadings. |
lambda |
fitted value of lambda ( |
logL |
log-likelihood for lambda model ( |
Liam Revell liam.revell@umb.edu, Joan Maspons
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.