sample_trees: Tree Sampling

Description Usage Arguments Value Examples

View source: R/removal_tree_sampling_aux.R

Description

Samples trees under a birth death model conditioned on sampling times.

In both cases, the function then reconstructs one tree per trajectory and returns these trees. One of k1 or e has to be specified. If both are specified, e will be ignored.

Usage

1
2
sample_trees(k1 = NULL, e = NULL, k2, sampling_times, lambda, mu, psi,
  r)

Arguments

k1

number of trajectories to simulate, from which k2 trajectories will be subsampled

e

ESS value to achieve

k2

number of trees to simulate

sampling_times

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

lambda

birth rate

mu

death rate

psi

sampling rate

r

removal probability

Value

a list of tree objects

Examples

1
sample_trees(k1=NULL, e=100, k2=100, sampling_times=c(1,2), lambda=2, mu=1, psi=0.3, r=0.2)

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