PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/in.progress/auteurExtended/man/phenogram.Rd

http://github.com/eastman/auteur
Unknown | 70 lines | 66 code | 4 blank | 0 comment | 0 complexity | 24690fc6e99a0687c7941febd8ad9097 MD5 | raw file
 1\name{phenogram}
 2\alias{bm.phenogram}
 3\alias{levy.phenogram}
 4\alias{phenogram}
 5%- Also NEED an '\alias' for EACH other topic documented here.
 6\title{
 7trait evolution along phylogenies}
 8\description{
 9simulating incremental phenotypic evolution by Brownian motion or Levy process along a phylogenetic tree}
10\usage{
11phenogram(phy, model = c("levy", "bm"), alpha = 0, rate = 0.01, lambda = 0.5, sigma = 0.5, increments = 100, plot = TRUE, node.cex = 2, ...)
12}
13%- maybe also 'usage' for other objects documented here.
14\arguments{
15  \item{phy}{
16a phylogenetic tree of class \code{phylo}}
17  \item{model}{
18a string (either "levy" or "bm") determining which process to use in simulating trait evolution}
19  \item{alpha}{
20the ancestral phenotypic value}
21  \item{rate}{
22a numeric value determining the rate of evolution; rates are not comparable between Levy and Brownian motion}
23  \item{lambda}{
24mean of the Poisson distribution from which the number of trait-evolutionary saltations are drawn; applies only where \code{model="levy"}}
25  \item{sigma}{
26standard deviation of the distribution from which saltation sizes are drawn; applies only where \code{model="levy"}}
27  \item{increments}{
28the number of branch segments used to discretize the time-continuous process (for a root-to-tip path); if \code{increments=NULL}, only 
29the phenotypic values at nodes are plotted}
30  \item{plot}{a logical value determining whether a plot is generated}
31  \item{node.cex}{plot symbol size for the phenotypic values at nodes}
32  \item{\dots}{
33additional arguments to be passed to \code{plot}}
34}
35\details{
36%%  ~~ If necessary, more details than the description above ~~
37}
38\value{
39This function generates a phenogram (if \code{plot=TRUE}) of evolutionary change in phenotype along a phylogeny and returns a table of 
40ancestral values (\code{phenotype}) for each node in the topology (\code{descendant}). Using the \code{\link[ape]{ape-package}} format 
41for edge identification, each \code{ancestor} and \code{descendant} is given an integer value. The split \code{time} of each node 
42is given in this last column of the returned table.  }
43\references{
44%% ~put references to the literature/web site here ~
45}
46\author{
47LJ Revell, LJ Harmon, and JM Eastman}
48\note{
49%%  ~~further notes~~
50}
51
52%% ~Make other sections like Warning with \section{Warning }{....} ~
53
54\seealso{
55%% ~~objects to See Also as \code{\link{help}}, ~~~
56}
57\examples{
58## BROWNIAN MOTION ##
59phenogram(rcoal(20)->phy,model="bm",rate=0.005,increments=100,lwd=2)
60phenogram(phy,model="bm",rate=0.0075,increments=100,lwd=2)
61phenogram(phy,model="bm",rate=0.01,increments=100,lwd=2)
62phenogram(phy,model="bm",rate=0.01,increments=NULL,lwd=2)
63
64## LEVY MOTION ##
65phenogram(phy,model="levy",rate=0.1,lambda=0.25,sigma=0.75,increments=100,lwd=2)
66phenogram(phy,model="levy",rate=0.1,lambda=0.5,sigma=0.75,increments=100,lwd=2)
67phenogram(phy,model="levy",rate=0.1,lambda=2,sigma=0.75,increments=100,lwd=2)
68phenogram(phy,model="levy",rate=0.1,lambda=2,sigma=0.75,increments=NULL,lwd=2)
69
70}