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.simnow 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 (seebd.simdocumentation
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.traitssimulates 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 thenHiddenparameter, 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.traitsfor details.
In the future, other trait-dependent diversification models will be
implemented, including relaxing the assumption of discrete traits.sample.clade.traitssimulates state-dependent fossil sampling,
following a similar algorithm asbd.sim.traits. It allows for a
hidden state model as well, but note that trait information (usually
coming frombd.sim.traits) needs to include all states as observed
for that (see examples in?sample.clade.traitsand vignettes for
details).draw.simcan 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
overviewvignette for examples.
Adding sampled ancestors to a phylogenetic tree
make.phylonow allows for an optionalfossilsinput 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 thesaFormat
input is set to"branch", or as degree-2 nodes if it is set to
"node". ThereturnTrueExtinput 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 toFALSE. Note
that this last functionality required a limited version of the
drop.tipfunction of theAPEpackage to be copied. See
?make.phylofor 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.occurrencesallows for post-hoc binning of fossil occurrences,
so one can take a fossil record including only true times, i.e. an
output ofsample.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 usingadFunwith extant species.make.phylo.R: corrected bug in node labels.