Description Usage Arguments Value Author(s) References See Also Examples
This function draws a certain number of patterns from a specified mutagenetic trees mixture model. Thus, the mixture model has to be specified. When besides the mixture model also the sampling mode and its respective sampling parameter are specified, this function simulates patterns together with their waiting and sampling times from the respective model.
1 |
model |
An object of the class |
sampling.mode |
A |
sampling.param |
A |
... |
|
The function returns an RtreemixData
object in the case when
one wants to draw a certain number of patterns from a given mixture
model, i.e. when only the mutagenetic trees mixture model and the
number of patterns to be drawn are specified. When besides the model
also the sampling mode and the sampling parameter are given, the
function returns an object from the RtreemixSim
class where the
simulated patterns together with their sampling and waiting times are stored.
Jasmina Bogojeska
Learning multiple evolutionary pathways from cross-sectional data, N. Beerenwinkel et al.
RtreemixSim-class
, RtreemixModel-class
,
RtreemixData-class
1 2 3 4 5 6 7 8 9 10 11 12 | ## Create a random RtreemixModel object with 3 branchings and 9 genetic events.
rand.mod <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob = c(0.2, 0.8))
## Draw 300 samples from the randomly generated model rand.mod
data <- sim(model = rand.mod, no.draws = 300)
show(data)
## Create an RtreemixSim object by simulating patterns with their sampling and waiting times from a given mixture model.
sim.data <- sim(model = rand.mod, sampling.mode = "exponential", sampling.param = 1, no.sim = 100)
show(sim.data)
WaitingTimes(sim.data)
SamplingTimes(sim.data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.