Description Usage Arguments Value Examples
View source: R/removal_tree_sampling_aux.R
Samples trees under a birth death model conditioned on sampling times.
If k1
is specified then the function simulates k1
weighted trajectories, then subsample k2
trajectories from them.
If e
is specified the function will simulate just enough weighted trajectories to obtain an ESS value greater or equal to e
, and then subsample k2
trajectories from them.
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.
1 2 | sample_trees(k1 = NULL, e = NULL, k2, sampling_times, lambda, mu, psi,
r)
|
k1 |
number of trajectories to simulate, from which |
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 |
a list of tree
objects
1 | sample_trees(k1=NULL, e=100, k2=100, sampling_times=c(1,2), lambda=2, mu=1, psi=0.3, r=0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.