distribution.oncotree | R Documentation |
distribution.oncotree
calculates the joint distribution
of the events defined by the tree, while marginal.distr
calculates the marginal probability of occurrence of each event.
distribution.oncotree(otree, with.probs = TRUE, with.errors=FALSE, edge.weights=if (with.errors) "estimated" else "observed") marginal.distr(otree, with.errors = TRUE, edge.weights=if (with.errors) "estimated" else "observed")
otree |
An object of class |
with.probs |
A logical value specifying if only the set of possible outcomes should be returned (if TRUE), or the associated probabilities of occurrence as well. |
with.errors |
A logical value specifying whether false positive and negative error rates should be incorporated into the distribution. |
edge.weights |
A choice of whether the observed or estimated
edge transition probabilities should be used in the calculation
of probabilities. See |
For distribution.oncotree
: a data frame each row of which
gives a possible outcome.
For marginal.distr
: a named numeric vector - the names
are the event names (+ ‘Root’) and the values are the
corresponding marginal probability of occurrence.
Aniko Szabo
oncotree.fit
data(ov.cgh) ov.tree <- oncotree.fit(ov.cgh) #joint distribution jj <- distribution.oncotree(ov.tree, edge.weights="obs") head(jj) jj.eps <- distribution.oncotree(ov.tree, with.errors=TRUE) head(jj.eps) #marginal distribution marginal.distr(ov.tree, with.error=FALSE) #marginal distribution calculated from the joint apply(jj[1:ov.tree$nmut], 2, function(x){sum(x*jj$Prob)}) ##Same with errors incorporated #marginal distribution marginal.distr(ov.tree, with.error=TRUE) #marginal distribution calculated from the joint apply(jj.eps[1:ov.tree$nmut], 2, function(x){sum(x*jj.eps$Prob)})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.