pbd_sim: Function to simulate the protracted speciation process
Description
Simulating the protracted speciation process using the Doob-Gillespie algorithm.
This function differs from pbd_sim_cpp that 1) it does not require that the speciation-initiation
rate is the same for good and incipient species, and 2) that it simulates the exact protracted
speciation process, and not the approximation made by the coalescent point process.
Usage
pbd_sim(
pars,
age
)
Arguments
pars
Vector of parameters:
pars[1] corresponds to b_1, the speciation-initiation rate of good species
pars[2] corresponds to la_1, the speciation-completion rate
pars[5] corresponds to b_2, the speciation-initiation r