Rafael and Liam --

> So far as I know, there is currently no way to explicitly take into account
> sampling error in computing principal components while also accounting for
> the phylogeny. However, it is relatively straightforward to compute scores
> for individuals from a PCA conducted on species means.
> This would look as follows (in which Xm is a matrix containing values for
> species for each trait, and Xi is a matrix with the same number of columns
> but containing values for individuals):
> pca<-phyl.pca(tree,Xm)
> Si<-Xi%*%pca$Evec
> Then, if you have a separate vector containing species ID as a factor, you
> could compute means and variances for each component by species.

There are methods (not all implemented in R) for taking into
account the within-species phenotypic covariation among
individuals and also the evolutionary covariances between
species (on a phylogeny).  These include the method of
Ives, Midford, and Garland (2007) and my own method
(2008).  The former assumes you know the within-species
covariance matrix, the latter estimates it from the sampled
individuals for each species.  Both of these assume that the
true within-species phenotypic covariance matrices are the
same for all species.

For my method, you can use Liam's package Rphylip to
call my program Contrast if you also have PHYLIP installed.

Once you infer these covariance matrices, those are the
relevant sufficient statistics (if the distributions are
multivariate normal).  The PCA axes for either covariance
matrix can then be computed from those, or the
canonical variates axes, which are the principal components
of the between-species covariation relative to the
within-species covariation.

You don't need to use the PCA machinery until after you
estimate these two covariance matrices.

Joe Felsenstein         j...@gs.washington.edu
 Department of Genome Sciences and Department of Biology,
 University of Washington, Box 355065, Seattle, WA 98195-5065 USA

R-sig-phylo mailing list - R-sig-phylo@r-project.org
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to