Skip to content

v1.1.0: Traits

Latest

Choose a tag to compare

@brpetrucci brpetrucci released this 11 Jun 19:59

paleobuddy 1.1.0.0

This is the paleobuddy release intended to go with my paper on the accuracy of SSE models with trees including fossil data. Besides adding the possibility of simulating SSE models (specifically only as general as MuHiSSE, i.e. it currently does not support quantitative traits or cladogenetic transitions), we also added the possibility to simulate to a certain number of extant species (as opposed to forcing conditioning on time), and some quality-of-life additions. This release is a little late compared to when I submitted to CRAN, whoops.

Simulating to a number of extant species

  • bd.sim now allows for simulation up to a number of species as well
    as the original implementation simulating up to a certain time. To
    choose which realization of a certain number of species we choose, we
    use the method proposed by Stadler 2011 (see bd.sim documentation
    for full reference), whereby we simulate to a much larger number of
    species, then go back to check which periods had the desired number,
    and choose one through weighted sampling using the amount of time
    spent in each as the weights. Finally, we sample a uniform
    distribution to decide the length of the final period between when the
    species number was achieve and the end of the simulation.

Trait-dependent dynamics

Added functions to simulate trait evolution and trait-dependent birth
death models, in particular State Speciation and Extinction (SSE) models
BiSSE, MuSSE, and QuaSSE. See documentation for full reference.

  • bd.sim.traits simulates species diversification following a MuSSE
    model, where traits evolve from an Mk model and change speciation
    and/or extinction in a discrete fashion. Allows for the simulation of
    multiple traits, though currently the rates can only depend on one of
    them (each rate can depend on a different trait, though). Can simulate
    HiSSE as well, by setting the nHidden parameter, representing the
    number of hidden states, to something higher than 1. Can set separate
    number of states (observed or hidden), initial trait values, and
    transition matrices for each trait. See ?bd.sim.traits for details.
    In the future, other trait-dependent diversification models will be
    implemented, including relaxing the assumption of discrete traits.
  • sample.clade.traits simulates state-dependent fossil sampling,
    following a similar algorithm as bd.sim.traits. It allows for a
    hidden state model as well, but note that trait information (usually
    coming from bd.sim.traits) needs to include all states as observed
    for that (see examples in ?sample.clade.traits and vignettes for
    details).
  • draw.sim can now color longevity segments and fossil occurrences
    based on the trait values of a given trait for each species through
    time. Customization options include which colors to use for each
    state, whether to plot fossils as true occurrence times or ranges
    (already present in 1.0, but now with a dedicated argument for such,
    fossilsFormat), and where to place trait value legend. See
    ?draw.sim, ?bd.sim.traits, ?sample.clade.traits, and the
    overview vignette for examples.

Adding sampled ancestors to a phylogenetic tree

  • make.phylo now allows for an optional fossils input representing a
    fossil record, and will then add these fossils to the tree as sampled
    ancestors. These SAs are added as 0-length branches if the saFormat
    input is set to "branch", or as degree-2 nodes if it is set to
    "node". The returnTrueExt input optionally drops the tip
    representing the true extinction time of a species, and make the last
    sampled fossil of that species the fossil tip, if set to FALSE. Note
    that this last functionality required a limited version of the
    drop.tip function of the APE package to be copied. See
    ?make.phylo for reference and credits.

Changes to vignettes

overview

  • The Per Capita method estimation was changed to have a more accurate
    estimate.
  • A complex example was added to the end to respond to comments from a
    reviewer in the manuscript.
  • Examples of new features for version 1.1 (see above) were added.

Other additions

  • bin.occurrences allows for post-hoc binning of fossil occurrences,
    so one can take a fossil record including only true times, i.e. an
    output of sample.clade(..., returnTrue = TRUE), and bin it to
    produce the uncertainty in fossil ages ubiquitous in the true fossil
    record.

Simple fixes

  • sample.clade.R: added a small bit on help page to explain the
    complication of using adFun with extant species.
  • make.phylo.R: corrected bug in node labels.