edge.prob {saturnin} | R Documentation |
The function computes posterior edge appearance probabilities in a random tree from a (log-)weight matrix.
The (log-)weight matrix can be obtained from one of the functions lweights_multinomial
, lweights_gaussian
or weights_gausscopula
.
The function can also account for prior edge appearance probability.
edge.prob(W, log = TRUE, account.prior = FALSE, q0 = 0.5)
W |
(log-)weight matrix |
log |
|
account.prior |
|
q0 |
Desired prior edge appearance probability. |
prob |
Posterior edge appearance probability matrix. |
Loïc Schwaller
This package implements the method described in the paper "Bayesian Inference of Graphical Model Structures Using Trees" by L. Schwaller, S. Robin, M. Stumpf, 2015 (submitted and availavable on arXiv).
library('saturnin')
data(data_gaussian)
W <- lweights_gaussian(data_gaussian)
prob <- edge.prob(W, log = TRUE, account.prior = TRUE, q0 = 0.5)