]> git.donarmstrong.com Git - ape.git/blob - man/corClasses.Rd
fix bug in seg.sites + improved Damien's man pages
[ape.git] / man / corClasses.Rd
1 \name{corClasses}
2 \alias{corClasses}
3 \alias{corPhyl}
4 \title{Phylogenetic Correlation Structures}
5 \description{
6   Classes of phylogenetic correlation structures (\code{"corPhyl"})
7   available in \pkg{ape}.
8
9   \item{corBrownian}{Brownian motion model (Felsenstein 1985)}
10   \item{corMartins}{The covariance matrix defined in Martins and Hansen
11     (1997)}
12   \item{corGrafen}{The covariance matrix defined in Grafen (1989)}
13   \item{corPagel}{The covariance matrix defined in Freckelton et al. (2002)}
14
15   See the help page of each class for references and detailed
16   description.
17 }
18 \seealso{
19   \code{\link[nlme]{corClasses}} and \code{\link[nlme]{gls}} in the
20   \pkg{nlme} librarie, \code{\link{corBrownian}},
21   \code{\link{corMartins}}, \code{\link{corGrafen}},
22   \code{\link{corPagel}}
23 }
24 \author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr}, Emmanuel
25   Paradis}
26 \examples{
27 library(nlme)
28 cat("((((Homo:0.21,Pongo:0.21):0.28,",
29 "Macaca:0.49):0.13,Ateles:0.62):0.38,Galago:1.00);",
30 file = "ex.tre", sep = "\n")
31 tree.primates <- read.tree("ex.tre")
32 X <- c(4.09434, 3.61092, 2.37024, 2.02815, -1.46968)
33 Y <- c(4.74493, 3.33220, 3.36730, 2.89037, 2.30259)
34 unlink("ex.tre") # delete the file "ex.tre"
35 m1 <- gls(Y~X, correlation=corBrownian(1, tree.primates))
36 summary(m1)
37 m2 <- gls(Y~X, correlation=corMartins(1, tree.primates))
38 summary(m2)
39 corMatrix(m2$modelStruct$corStruct)
40 m3 <- gls(Y~X, correlation=corGrafen(1, tree.primates))
41 summary(m3)
42 corMatrix(m3$modelStruct$corStruct)
43 }
44 \keyword{models}
45