emphasis · simulator

A clade diversifying under an endogenous diversification model

Each lineage speciates at rate λ and goes extinct at rate μ, and both can depend on the clade's diversity N, on the lineage's age-imbalance D and on its evolutionary distinctiveness ED. The trees are drawn by a port of the package's forward simulator, run in your browser.

Model


Link

Speciation λ

Clade

Extinction μ

Tree
has a sampled living descendant living descendants all unsampled no living descendant

Lineages through timelog scale
completereconstructedsampled (at the present)
Per-lineage rates
λμ

The same model in R:



  

Reading the tree

The tree is drawn forward from its crown, two lineages at time 0, to the present at the crown age. A branch is green while some lineage below it is alive, and grey once its whole subtree is extinct. At the present, the sampling fraction ρ removes tips at random, as simulate_tree(rho = …) does: branches whose living descendants were all removed turn ochre.

Complete shows every lineage that ever lived. Reconstructed keeps only the ancestors of living species, the tree a molecular phylogeny of every extant species would recover. Sampled keeps only the ancestors of the sampled tips, the tree that is actually observed. emphasis estimates the rates from the sampled tree by drawing the missing lineages back in, which is going from the third view back to the first.

What the covariates do

N is the number of living lineages. A negative βN makes speciation slow as the clade fills up, and the lineages-through-time curve flattens. D is how much longer a lineage has gone without speciating than the clade average; a negative βD makes long-isolated lineages speciate less, and the rate panel spreads into a band because every lineage has its own rate. ED is a lineage's fair-proportion distinctiveness on the complete tree, and EDc (models edc, nedc) is the same score minus its mean over the living lineages, so it compares a lineage with its contemporaries the way D does. See the covariates and the meaning of D.

How close this is to the package

The simulator follows general_div::simulate_tree_ltable() step for step: Gillespie waiting times, the focal lineage and event type drawn from the per-lineage rates, and a draw retried when either crown lineage leaves no descendant. The number of draws a tree needed is shown under it; its inverse estimates the survival probability. The random numbers come from a different generator than R's, so a seed here does not reproduce a tree in R. What agrees is the distribution: dev/simulator/agreement.R draws 2,000 trees per scenario from each simulator and compares them, and checks the ED routine against the package's value tip by tip.

emphasis · documentation · source