Description Usage Arguments Value Author(s) See Also Examples

`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.

1 2 3 4 | ```
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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
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)})
``` |

Oncotree documentation built on May 31, 2017, 3:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.