Phylogenetic canonical correlation analysis, following Revell & Harrison (2008).
phyl.cca(tree, X, Y, lambda=1.0, fixed=TRUE)
An object of class "phyl.cca"
containing the following elements:
canonical correlations.
coefficients for the canonical variables for X
.
coefficients for the canonical variables for Y
.
matrix with the canonical scores for X
.
matrix with the canonical scores for Y
.
vector of \(\chi^2\) values.
P-values for the hypothesis test that the ith and all subsequent correlations are zero.
a phylogenetic tree in "phylo"
format.
a data matrix with traits in columns.
data matrix with traits in columns, to be correlated with X
.
optionally, a (fixed) value for \(\lambda\).
optionally, a logical value indicating whether or not to estimate \(\lambda\) using likelihood.
Liam Revell liam.revell@umb.edu
(Optional) joint optimization of \(\lambda\) is performed using optimize
on the interval (0,1).
Revell, L. J., Harrison, A. S. (2008) PCCA: A program for phylogenetic canonical correlation analysis. Bioinformatics, 24, 1018-1020.
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
phyl.pca