Hi Rafael.

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.

I hope this is some help. All the best, Liam

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de BiologĂ­a
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/

On 3/11/2018 5:06 PM, Rafael S Marcondes wrote:
Dear all,

Does anyone have any advice on how to calculate measurement error in an
analysis using phylogenetic principal components? Or, in other words, after
I run a phylogenetic PCA on species-level data, how can I "project" my
individual-level data into the phylogenetic PCs so I can calculate a
standard error? I'm running my pPCA using the lambda method and the
covariance matrix.

I would think this would be an usual, simple procedure, and that there
would be an R function for it, but I can't for the life of me find
anything. The recent paper by Jonathan Drury et al linked below does
mention doing it, but without going into any detail.

http://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2003563

Thank you very much for any help,


*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)

Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA

Twitter: @brown_birds <https://twitter.com/brown_birds>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to