coaltimeSim: Simulate from inhomogeneous, heterochronous coalescent.

Description Usage Arguments Value Examples

View source: R/phylo_functions.r

Description

For simulating coalescent times using the method of thinning. This function is based on code written by Michael Karcher for the phylodyn package.

Usage

1
coaltimeSim(samp_times, n_sampled, traj, lower_bound, ...)

Arguments

samp_times

numeric vector of sampling times.

n_sampled

numeric vector of samples taken per sampling time.

traj

function that returns effective population size at time t.

lower_bound

numeric lower limit on traj function on its support.

...

additional arguments to be passed to traj function.

Value

A list containing vectors of coalescent times coal_times, intercoalescent times intercoal_times, and number of active lineages lineages, as well as passing along samp_times and n_sampled.

Examples

1
coaltimeSim(0:2, 3:1, unif_traj, lower_bound=10, level=10)

jrfaulkner/bnps documentation built on Sept. 27, 2020, 12:34 p.m.