Phylogenetic paired t-test (Lindenfors et al. 2010).
phyl.pairedttest(): This function conducts a phylogenetic paired t-test, roughly following Lindenfors et al. (2010). The function takes a tree, two vectors containing the species values for two traits (e.g., male and female RBC), and, optionally, the standard errors for each trait in each species. It also (optionally) fits Pagel's lambda for the difference.
"tree" is a phylogenetic tree in "phylo" format;
"x1" and "x2" are data vectors for two traits;
"se1" and "se2" are standard errors for "x1" and "x2";
"lambda" is the starting value of Pagel's lambda (or fixed value, if fixed=TRUE);
"h0" is the null hypothesis (to be tested) for the difference between "x1" and "x2"; and
"fixed" is a logical value specifying whether or not to optimize lambda.
phyl.pairedttest() returns a list with the following components:
"dbar" is the phylogenetic mean difference;
"se" standard error of the mean ;
"sig2" evolutionary variance;
"lambda" fitted value for lambda;
"logL" log-likelihood of the fitted model;
"t.dbar" t-value (dbar-h0/standard error, computed from the Hessian); and
Function written by Liam J. Revell 2010.
Based on: Lindenfors, P., L. J. Revell, and C. L. Nunn. 2010. Sexual dimorphism in primate aerobic capacity: A phylogenetic test. Journal of Evolutionary Biology 23: 1183-1194
Last modified May 26, 2011.