Learn R Programming

phytools (version 0.2-40)

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")

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".

Value

  • a list with 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.

References

Revell, L. J. 2009. Size-correction and principal components for interspecific comparative studies. Evolution, 63, 3258--3268.

See Also

phyl.resid