X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=man%2FrTraitCont.Rd;h=2251c8594bb5765ecd589c8103e31a4699d94204;hb=2014b83971be4b9cd1644d6127837df798e9335c;hp=01d82e2bb60c936342b31872d53ba31101c8c487;hpb=24fc6c03893f85a3f9ab3d088201b3731f3035b4;p=ape.git diff --git a/man/rTraitCont.Rd b/man/rTraitCont.Rd index 01d82e2..2251c85 100644 --- a/man/rTraitCont.Rd +++ b/man/rTraitCont.Rd @@ -2,8 +2,8 @@ \alias{rTraitCont} \title{Continuous Character Simulation} \usage{ -rTraitCont(phy, model = "BM", sigma = 0.1, alpha = 1, - theta = 0, ancestor = FALSE, root.value = 0) +rTraitCont(phy, model = "BM", sigma = 0.1, alpha = 1, theta = 0, + ancestor = FALSE, root.value = 0, ...) } \arguments{ \item{phy}{an object of class \code{"phylo"}.} @@ -20,11 +20,13 @@ rTraitCont(phy, model = "BM", sigma = 0.1, alpha = 1, values at the nodes as well (by default, only the values at the tips are returned).} \item{root.value}{a numeric giving the value at the root.} + \item{\dots}{further arguments passed to \code{model} if it is a + function.} } \description{ This function simulates the evolution of a continuous character along a phylogeny. The calculation is done recursively from the root. See - Paradis (2006, p. 151) for a brief introduction. + Paradis (2012, pp. 232 and 324) for an introduction. } \details{ There are three possibilities to specify \code{model}: @@ -40,37 +42,38 @@ rTraitCont(phy, model = "BM", sigma = 0.1, alpha = 1, \item{\code{"OU"}:}{an Ornstein-Uhlenbeck model is used. The above indexing rule is used for the three parameters \code{sigma}, - \code{alpha}, and \code{theta}. This may be more interesting for the - last one to model varying phenotypic optima. Be careful that large - values of \code{alpha} may give unrealistic output.} + \code{alpha}, and \code{theta}. This may be interesting for the last + one to model varying phenotypic optima. The exact updating formula + from Gillespie (1996) are used which are reduced to BM formula if + \code{alpha = 0}.} \item{A function:}{it must be of the form \code{foo(x, l)} where \code{x} is the trait of the ancestor and \code{l} is the branch length. It must return the value of the descendant. The arguments \code{sigma}, \code{alpha}, and \code{theta} are ignored.} }} -\note{ - Currently, the OU model is a bit difficult to tune. Hopefully, this - may be improved in the future. -} \value{ A numeric vector with names taken from the tip labels of \code{phy}. If \code{ancestor = TRUE}, the node labels are used if present, otherwise, ``Node1'', ``Node2'', etc. } \references{ - Paradis, E. (2006) \emph{Analyses of Phylogenetics and Evolution with - R.} New York: Springer. + Gillespie, D. T. (1996) Exact numerical simulation of the + Ornstein-Uhlenbeck process and its integral. \emph{Physical Review E}, + \bold{54}, 2084--2091. + + Paradis, E. (2012) \emph{Analysis of Phylogenetics and Evolution with + R (Second Edition).} New York: Springer. } \author{Emmanuel Paradis} \seealso{ - \code{\link{rTraitDisc}}, \code{\link{ace}} + \code{\link{rTraitDisc}}, \code{\link{rTraitMult}}, \code{\link{ace}} } \examples{ data(bird.orders) rTraitCont(bird.orders) # BM with sigma = 0.1 ### OU model with two optima: -tr <- reorder(bird.orders, "p") +tr <- reorder(bird.orders, "postorder") plot(tr) edgelabels() theta <- rep(0, Nedge(tr))