]> git.donarmstrong.com Git - ape.git/blob - man/evolve.phylo.Rd
b2770397fcf7d803bf2e21fef7ed9a1cc2948489
[ape.git] / man / evolve.phylo.Rd
1 \name{evolve.phylo}
2 \alias{evolve.phylo}
3 \title{Ancestral Character Simulation}
4 \description{
5   Simulate the (independent) evolution of one or several continuous
6   characters along a given phylogenetic tree under a homogeneous
7   Brownian model.
8 }
9 \usage{
10 evolve.phylo(phy, value, var)
11 }
12 \arguments{
13   \item{phy}{an object of class 'phylo' with branch lengths.}
14   \item{value}{ancestral states, one by character. The (optional) names
15     of this vector will be used as character names.}
16   \item{var}{the variance of each character.}
17 }
18 \details{
19   Let x be a continuous character.
20   If it evolves according to a Brownian model, its value at time t follows a normal law with mean x0 and variance t*sigma\_x,
21   where x0 is the value of the character at time 0, and sigma\_x is the 'inner' variance of the character.
22   The evolution of a continuous character is performed by letting the character evolve on each branch, from its ancestral root state.
23   The final state of a branch is the ancestral states of the daughter branches, and so on.
24 }
25 \value{
26   An object of class 'ancestral', inheriting from the 'phylo' class. The
27   following components are added:
28
29   \item{node.character}{a data.frame with node ids as rownames and one
30     column by character, containing all the inner node values for each
31     character.}
32   \item{tip.character}{a data.frame with tip ids as rownames and one
33     column by character, containing all the tip values for each
34     character.}
35 }
36 \author{Julien Dutheil \email{julien.dutheil@univ-montp2.fr}}
37 \seealso{
38   \code{\link{plot.ancestral}}, \code{\link{ace}}
39 }
40 \examples{
41 data(bird.orders)
42 x <- rep(0, 5)
43 names(x) <- c("A", "B", "C", "D", "E")
44 anc1 <- evolve.phylo(bird.orders, x, 1)
45 anc2 <- evolve.phylo(bird.orders, x, 1)
46 cor(anc1$tip.character, anc2$tip.character)
47 }
48 \keyword{models}