Y) and computes the residuals. Designed for phylogenetic size correction using GLS regression (e.g., Revell 2009; Evolution).
phyl.resid(tree, x, Y, method="BM")"phylo" format."BM" or "lambda".method="lambda" using optimize on the interval (0,1). This function is redundant with residuals(gls(...,correlation=corPagel(...))), but some users may find this method simpler, and it provides a good way to cross-check your results & make sure that you are using gls correctly.
Revell, L. J. (2010) Phylogenetic signal and linear regression on species data. Methods in Ecology and Evolution, 1, 319-329.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
phyl.pca, gls