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