coalsim: Simulate from inhomogeneous, heterochronous coalescent

Description Usage Arguments Value Examples

View source: R/coalsieve.R

Description

Simulate from inhomogeneous, heterochronous coalescent

Usage

1
2
coalsim(samp_times, n_sampled, traj, method = "tt", val_upper = 10,
  lower_bound = 1, ...)

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.

method

which sampling method to use. "tt" invoke time-transformation method, "thin" invokes thinning method.

val_upper

numeric used by time-transformation method to set a starting point for its dynamic numerical integration upper bound.

lower_bound

numeric lower limit of traj function on its support. Used only by thinning method.

...

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
coalsim(0:2, 3:1, unif_traj, lower_bound=10)

phylodyn documentation built on May 29, 2017, 1:28 p.m.