Description Usage Arguments Value Examples
View source: R/fbd.calculations.R
Calculate the probabilty of speciaton, extinction and sampling rates for a given set of stratigraphic ranges
1 2 3 4 5 | recount.gamma(frs)
recount.extant(frs)
fbd.probability(frs, b, d, s, k, rho = 1, complete = F, mpfr = F)
|
frs |
Dataframe of species ranges |
b |
Rate of speciation |
d |
Rate of extinction |
s |
Rate of sampling |
k |
Number of fossils |
Log likelihood
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # simulate tree & fossils
birth = 1
death = 0.1
t = TreeSim::sim.bd.taxa(100, 1, birth, death)[[1]]
psi = 1
f = FossilSim::sim.fossils.poisson(tree = t, psi)
k = length(f$sp)
# add extant occurrences
f = FossilSim::sim.extant.samples(f, t)
# calculate range attachment times given incomplete sampling
frs = attachment.times(t, f)
# rename range data headers
names(frs)[2]<-"bi"
names(frs)[3]<-"di"
names(frs)[4]<-"oi"
frs = recount.extant(frs)
frs = recount.gamma(frs)
fbd.probability(frs, birth, death, psi, k)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.