Phylogenetic regression & residuals.
phyl.resid(): this function fits a phylogenetic regression and computes residuals. Designed for phylogenetic size correction using generalized least squares regression (e.g., Revell 2009).
Input
result<-phyl.resid(tree,x,Y,method="BM")
"tree" is a phylogenetic tree in "phylo" format;
"x" is a vector or matrix containing a single x variable (e.g., size), or multiple x variables in columns;
"Y" is a vector or matrix containing one or multiple dependent variables (e.g., morphological traits; both "x" and "Y" should be named or row labeled with the species names.
"method" is the method to obtain the correlation structure for the model: can be "BM" or "lambda."
Output
phyl.resid() returns a list with the following elements:
"beta" a vector or matrix of regression coefficients;
"resid" a vector or matrix of residuals for species;
"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.
Revell, L. J. 2010. Phylogenetic signal and linear regression on species data. Methods in Ecology and Evolution 1: 319-329.
home
Last modified Apr. 4, 2011.