Phylogenetic principal components analysis.
phyl.pca(): this function performs phylogenetic principal components analysis (e.g., Revell 2009).
Input
result<-phyl.pca(tree,Y,method="BM",mode="cov")
"tree" is a phylogenetic tree in "phylo" format;
"Y" is a matrix containing traits in columns;
"method" is the method to obtain the correlation structure for the model: can be "BM" or "lambda;"
"mode" is the mode for PCA: can be "cov" or "corr."
Output
phyl.pca() returns a list with the following elements:
"Eval" a diagonal matrix containing the eigenvalues;
"Evec" a matrix with eigenvectors in columns;
"S" a matrix with scores;
"L" a matrix with loadings;
"lambda" a vector of lambda values (method="lambda" only);
"logL" a vector of log-likelihoods (method="lambda" only).
Citation
Function written by Liam J. Revell 2011.
References
Revell, L. J. 2009. Size-correction and principal components for interspecific comparative studies. Evolution 63: 3258-3268.
home
Last modified Apr. 11, 2011.