Description Usage Arguments Value Note Author(s) References See Also Examples
This method fits an RtreemixModel
to a given dataset and then
analyzes its variance with the bootstrap method. The data
and
the number of trees K
have to be specified.
1 |
data |
An |
K |
An |
... |
|
The function returns an object from the class
RtreemixModel
. This is the mixture model learned on the given
data
. Besides the edge weights it also contains their confidence
intervals resulting from the bootstrap analysis. Confidence intervals
for the mixture parameters are also comupted and available.
The bootstrap examples are time consuming. They are commented out because of the time restrictions of the check of the package. For trying out the code please copy it and uncomment it.
Jasmina Bogojeska
Learning multiple evolutionary pathways from cross-sectional data, N. Beerenwinkel et al.
RtreemixData-class
,
RtreemixModel-class
, fit-methods
1 2 3 4 5 6 7 8 9 10 11 | ## Create an RtreemixData object from a randomly generated RtreemixModel object.
#rand.mod <- generate(K = 2, no.events = 7, noise.tree = TRUE, prob = c(0.2, 0.8))
#data <- sim(model = rand.mod, no.draws = 300)
## Create a RtreemixModel and analyze its variance with the bootstrap method.
#mod.boot <- bootstrap(data = data, K = 2, equal.edgeweights = TRUE, B = 10) ## time consuming computation
## See the confidence intervals for the mixture parameters (the weights).
#WeightsCI(mod.boot)
## See the confidence intervals of the conditional probabilities assigned to the edges.
#edgeData(getTree(mod.boot, 2), attr = "ci")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.