phyl.pca: Phylogenetic principal components analysis
Description
This function performs phylogenetic PCA (e.g., Revell 2009; Evolution).Usage
phyl.pca(tree, Y, method="BM", mode="cov")
## S3 method for class 'phyl.pca':
biplot(x, ...)
Arguments
tree
phylogeny as an object of class "phylo".
Y
data matrix with traits in columns.
method
method to obtain the correlation structure: can be "BM" or "lambda".
mode
is the mode for the PCA: can be "cov" or "corr".
x
object of class "phyl.pca" for biplot.phyl.pca.
...
for S3 plotting method biplot.phyl.pca, other arguments to be passed to biplot. Value
- An object of class
phyl.pca which is a list with some or all of the following components: - Evaldiagonal matrix of eigenvalues.
- Evecmatrix with eigenvectors in columns.
- Smatrix with scores.
- Lmatrix with loadings.
- lambdafitted value of lambda (
method="lambda" only). - logLlog-likelihood for lambda model (
method="logL" only).
Details
If method="lambda" $\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".References
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.