pbd_sim_cpp {PBD} | R Documentation |
Simulating the protracted speciation process according to the approxiomate model of Lambert et al. 2014. This function differs from pbd_sim that 1) it requires that the speciation-initiation rate is the same for good and incipient species, and 2) that it does not simulate the exact protracted speciation process, but an approximation made by the coalescent point process.
pbd_sim_cpp(
pars,
parsf = c(function(t,pars) {pars[1]},function(t,pars) {pars[2]},
function(t,pars) {pars[3]},function(t,pars) {pars[4]}),
age,
soc = 2,
plotltt = 1,
methode = "lsoda"
)
pars |
Vector of parameters: |
parsf |
Vector of functions how the rates depend on time, default functions are constant functions of the parameters in pars1: |
age |
Sets the crown age for the simulation |
soc |
Determines whether the simulation should start at stem (1) or crown (2) age |
plotltt |
Sets whether the lineage-through-time plot should be plotted (1) or not (0) |
methode |
Sets which method should be used in the ode-solver. Default is 'lsoda'. See package deSolve for details. |
A set of branching times
Rampal S. Etienne
pbd_sim_cpp(pars = c(0.2,1,0.2,0.1),age = 15)