Learn R Programming

geomorph (version 2.0.1)

compare.evol.rates: Comparing rates of shape evolution on phylogenies

Description

Function calculates rates of shape evolution for two or more groups of species on a phylogeny from a set of Procrustes-aligned specimens

Usage

compare.evol.rates(phy, A, gp, iter = 999)

Arguments

phy
A phylogenetic tree of {class phylo} - see read.tree in library ape
A
A matrix (n x [p x k]) or 3D array (p x k x n) containing GPA-aligned coordinates for a set of specimens
gp
A factor array designating group membership
iter
Number of iterations for significance testing

Value

  • Function returns a list with the following components:
  • sigma.dThe phylogenetic evolutionary rate for all species on the phylogeny
  • sigmad.allThe phylogenetic evolutionary rate for each group of species on the phylogeny
  • sigmad.ratioThe ratio of maximum to minimum evolutionary rates
  • pvalueThe significance level of the observed ratio
  • pairwise.pvalueMatrix of pairwise significance levels comaring each pair of rates

Details

The function compares rates of morphological evolution for two or more groups of species on a phylogeny, under a Brownian motion model of evolution. It is assumed that the landmarks have previously been aligned using Generalized Procrustes Analysis (GPA) [e.g., with gpagen]. The approach is based on the distances between species in morphospace after phylogenetic transformation (Adams 2014). From the data the rate of shape evolution for each group is calculated, and a ratio of rates is obtained. If three or more groups of species are used, the ratio of the maximum to minimum rate is used as a test statistic (see Adams 2014). Significance testing is accomplished by phylogenetic simulation in which tips data are obtained under Brownian motion using a single evolutionary rate for all species on the phylogeny. If three or more groups of species are used, pairwise p-values are also returned. A histogram of evolutionary rate ratios obtained via phylogenetic simulation is presented, with the observed value designated by an arrow in the plot. The function can be used to obtain a rate for the whole dataset of species by using a dummy group factor assigning all species to one group. This function can be used with univariate data (i.e. centroid size) if imported as matrix with rownames giving the taxa names.

References

Adams, D.C. 2014. Quantifying and comparing phylogenetic evolutionary rates for shape and other high-dimensional phenotypic data. Syst. Biol. 63:166-177.

Examples

Run this code
data(plethspecies)
Y.gpa<-gpagen(plethspecies$land)    #GPA-alignment

 gp.end<-factor(c(0,0,1,0,0,1,1,0,0))  #endangered species vs. rest
 names(gp.end)<-plethspecies$phy$tip

#Calculate rates of shape
compare.evol.rates(plethspecies$phy,Y.gpa$coords,gp=gp.end,iter=49)

#Calculate rates of size
Csize <- matrix(Y.gpa$Csize, dimnames=list(names(Y.gpa$Csize))) # make matrix Csize with names
compare.evol.rates(plethspecies$phy,Csize,gp=gp.end,iter=49)

Run the code above in your browser using DataLab