trajectory: Trajectory Simulation

Description Usage Arguments Value Examples

View source: R/removal_tree_sampling_aux.R

Description

Simulates a trajectory of the population size under a constant-rate birth-death model as well as the removal vector y (y_i=1 iff s_i is removed upon sampling). It uses Gillespie algorithm to simulate portions of trajectory in the time intervals between removals.

Usage

1
trajectory(lambda, mu, r, sampling_times)

Arguments

lambda

birth rate

mu

death rate

r

removal probability, the probability for an individual to be removed upon sampling

sampling_times

vector containing the sampling times (s_j)_{j=1...k} in increasing order

Value

an object of the class trajectory, containing:

Examples

1
trajectory(lambda=2, mu=1, r=0.2, sampling_times=c(1,2))

JasmineGamblin/bdTreeSim documentation built on Nov. 11, 2019, 6:28 a.m.