Learn R Programming

ape (version 5.3)

compar.cheverud: Cheverud's Comparative Method

Description

This function computes the phylogenetic variance component and the residual deviation for continous characters, taking into account the phylogenetic relationships among species, following the comparative method described in Cheverud et al. (1985). The correction proposed by Rholf (2001) is used.

Usage

compar.cheverud(y, W, tolerance = 1e-06, gold.tol = 1e-04)

Arguments

y

A vector containing the data to analyse.

W

The phylogenetic connectivity matrix. All diagonal elements will be ignored.

tolerance

Minimum difference allowed to consider eigenvalues as distinct.

gold.tol

Precision to use in golden section search alogrithm.

Value

A list with the following components:

rhohat

The maximum likelihood estimate of \(\rho\)

Wnorm

The normalized version of W

residuals

Error terms (\(e\))

Details

Model: $$y = \rho W y + e$$

where \(e\) is the error term, assumed to be normally distributed. \(\rho\) is estimated by the maximum likelihood procedure given in Rohlf (2001), using a golden section search algorithm. The code of this function is indeed adapted from a MatLab code given in appendix in Rohlf's article, to correct a mistake in Cheverud's original paper.

References

Cheverud, J. M., Dow, M. M. and Leutenegger, W. (1985) The quantitative assessment of phylogenetic constraints in comparative analyses: sexual dimorphism in body weight among primates. Evolution, 39, 1335--1351.

Rohlf, F. J. (2001) Comparative methods for the analysis of continuous variables: geometric interpretations. Evolution, 55, 2143--2160.

Harvey, P. H. and Pagel, M. D. (1991) The Comparative Method in Evolutionary Biology. Oxford University Press.

See Also

compar.lynch

Examples

Run this code
# NOT RUN {
### Example from Harvey and Pagel's book:
y<-c(10,8,3,4)
W <- matrix(c(1,1/6,1/6,1/6,1/6,1,1/2,1/2,1/6,1/2,1,1,1/6,1/2,1,1), 4)
compar.cheverud(y,W)
### Example from Rohlf's 2001 article:
W<- matrix(c(
  0,1,1,2,0,0,0,0,
  1,0,1,2,0,0,0,0,
  1,1,0,2,0,0,0,0,
  2,2,2,0,0,0,0,0,
  0,0,0,0,0,1,1,2,
  0,0,0,0,1,0,1,2,
  0,0,0,0,1,1,0,2,
  0,0,0,0,2,2,2,0
),8)
W <- 1/W
W[W == Inf] <- 0
y<-c(-0.12,0.36,-0.1,0.04,-0.15,0.29,-0.11,-0.06)
compar.cheverud(y,W)
# }

Run the code above in your browser using DataLab