phyl.pairedttest {phytools} | R Documentation |
This function conducts a phylogenetic paired t-test, roughly following Lindenfors et al. (2010; J. Evol. Biol.). This is not a phylogenetic ANOVA, in which we want to compare the means of different sets of species on the tree. Instead, we are interested in the difference between two characters, or two measures of a character within a species, and we want to know if this difference is significantly different from zero controlling for the phylogenetic non-independence of species.
phyl.pairedttest(tree, x1, x2=NULL, se1=NULL, se2=NULL, lambda=1.0, h0=0.0, fixed=FALSE)
tree |
a phylogeny as an object of class |
x1 |
data vector for first trait, or matrix with two traits in columns. |
x2 |
data vector for second trait (or null if |
se1 |
standard errors for |
se2 |
standard errors for |
lambda |
starting value for Pagel's lambda (or fixed value, if |
h0 |
null hypothesis (to be tested) for the mean difference between |
fixed |
logical value specifying whether or not to optimize lambda. |
Likelihood optimization is performed using optim
with method="L-BFGS-B"
with box constraints on lambda (0,1).
A list with the following components:
dbar |
phylogenetic mean difference. |
se |
standard error of |
sig2 |
estimated evolutionary variance (of the difference). |
lambda |
fitted (or fixed) value of lambda. |
logL |
log-likelihood of the fitted model. |
t.dbar |
t-value ( |
P.dbar |
P-value. |
Liam Revell liam.revell@umb.edu
Lindenfors, P., L. J. Revell, and C. L. Nunn (2010) Sexual dimorphism in primate aerobic capacity: A phylogenetic test. J. Evol. Biol., 23, 1183-1194.
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.