Learn R Programming

phytools (version 0.3-72.1)

phyl.pairedttest: Phylogenetic paired t-test

Description

This function conducts a phylogenetic paired t-test, roughly following Lindenfors et al. (2010; J. Evol. Biol.).

Usage

phyl.pairedttest(tree, x1, x2=NULL, se1=NULL, se2=NULL, lambda=1.0, h0=0.0,
	fixed=FALSE)

Arguments

tree
a phylogeny as an object of class "phylo".
x1
data vector for first trait, or matrix with two traits in columns.
x2
data vector for second trait (or null if x1 is a matrix).
se1
standard errors for x1.
se2
standard errors for x2.
lambda
starting value for Pagel's lambda (or fixed value, if fixed=TRUE).
h0
null hypothesis (to be tested) for the mean difference between x1 and x2.
fixed
logical value specifying whether or not to optimize lambda.

Value

  • A list with the following components:
  • dbarphylogenetic mean differenc.
  • sestandard error of dbar.
  • sig2estimated evolutionary variance (of the difference).
  • lambdafitted (or fixed) value of lambda.
  • logLlog-likelihood of the fitted model.
  • t.dbart-value ((dbar-h0)/se where se is computed from the Hessian).
  • P.dbarP-value.

Details

Likelihood optimization is performed using optim with method="L-BFGS-B" with box constraints on lambda (0,1).

References

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.