]> git.donarmstrong.com Git - ape.git/blob - man/compar.cheverud.Rd
fix in read.dna and change in write.dna
[ape.git] / man / compar.cheverud.Rd
1 \name{compar.cheverud}
2 \alias{compar.cheverud}
3 \title{Cheverud's Comparative Method}
4 \description{
5   This function computes the phylogenetic variance component and the
6   residual deviation for continous characters, taking into account the
7   phylogenetic relationships among species, following the comparative
8   method described in Cheverud et al. (1985). The correction proposed by
9   Rholf (2001) is used.
10 }
11 \usage{
12 compar.cheverud(y, W, tolerance = 1e-06, gold.tol = 1e-04)
13 }
14 \arguments{
15   \item{y}{A vector containing the data to analyse.}
16   \item{W}{The phylogenetic connectivity matrix. All diagonal elements
17     will be ignored.}
18   \item{tolerance}{Minimum difference allowed to consider eigenvalues as
19     distinct.}
20   \item{gold.tol}{Precision to use in golden section search alogrithm.}
21 }
22 \details{
23   Model: \deqn{y = \rho W y + e}{y = rho.W.y + e}
24
25   where \eqn{e}{e} is the error term, assumed to be normally distributed.
26   \eqn{\rho}{rho} is estimated by the maximum likelihood procedure given
27   in Rohlf (2001), using a golden section search algorithm. The code of
28   this function is indeed adapted from a MatLab code given in appendix
29   in Rohlf's article, to correct a mistake in Cheverud's original paper.
30 }
31 \value{
32   A list with the following components:
33
34   \item{rhohat}{The maximum likelihood estimate of \eqn{\rho}{rho}}
35   \item{Wnorm}{The normalized version of \code{W}}
36   \item{residuals}{Error terms (\eqn{e}{e})}
37 }
38 \references{
39   Cheverud, J. M., Dow, M. M. and Leutenegger, W. (1985) The quantitative
40   assessment of phylogenetic constraints in comparative analyses: sexual
41   dimorphism in body weight among primates. \emph{Evolution},
42   \bold{39}, 1335--1351.
43
44   Rohlf, F. J. (2001) Comparative methods for the analysis of continuous
45   variables: geometric interpretations. \emph{Evolution}, \bold{55},
46   2143--2160.
47
48   Harvey, P. H. and Pagel, M. D. (1991) \emph{The Comparative Method in
49     Evolutionary Biology}. Oxford University Press.
50 }
51 \author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr}}
52 \seealso{\code{\link{compar.lynch}}}
53 \examples{
54 ### Example from Harvey and Pagel's book:
55 y<-c(10,8,3,4)
56 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)
57 compar.cheverud(y,W)
58 ### Example from Rohlf's 2001 article:
59 W<- matrix(c(
60   0,1,1,2,0,0,0,0,
61   1,0,1,2,0,0,0,0,
62   1,1,0,2,0,0,0,0,
63   2,2,2,0,0,0,0,0,
64   0,0,0,0,0,1,1,2,
65   0,0,0,0,1,0,1,2,
66   0,0,0,0,1,1,0,2,
67   0,0,0,0,2,2,2,0
68 ),8)
69 W <- 1/W
70 W[W == Inf] <- 0
71 y<-c(-0.12,0.36,-0.1,0.04,-0.15,0.29,-0.11,-0.06)
72 compar.cheverud(y,W)
73 }
74 \keyword{regression}