Visualisation of the birth-death algorithm from treats

Let's assume we already have a tree with three lineages after a period of t0 has elapsed (with trait values x and y at the two nodes).

Step 1: Selecting a lineage among the living lineages. For example t0 is selected. This can be controlled through the modifiers object (with selection).


Previous step

Next step

Lineage selection in modifiers "selection" part of the modifier: by default, the selection is randomly choosing one lineage among the lineages currently not extinct. In R this is equivalent to:

sample(1, n)

or in the treats algorithm:

sample(1, lineage$n)