Sampling is the probability of an extant species being sampled and included into the tree.
x
Vector of speciation times in the phylogeny. Time is measured increasing going into the past with the present being time 0. x can be obtained from a phylogenetic tree using getx(TREE).
root
If root = 1 then max(x) is the mrca (crown age), if root = 0 then max(x) is the age of a branch ancestral to the mrca (stem age).
survival
If survival = 1: The likelihood is conditioned on survival of the process (recommended). Otherwise survival = 0.
Value
res
-log likelihood of the birth and death rates given the tree.
References
T. Stadler. On incomplete sampling under birth-death models and connections to the sampling-based coalescent. Jour. Theo. Biol. 261: 58-66, 2009.