Description Usage Arguments Value See Also Examples
A 'flat' improper prior that assigns equal probability to all the graphs.
1 | priorUniform(graph)
|
graph |
The 'prior graph'. A |
A function computes the prior score of the supplied graph. This This function is of a suitable form to be used as a prior
1 2 3 4 5 6 7 8 9 10 11 12 13 | x1 <- factor(c("a", "a", "g", "c", "c", "a", "g", "a", "a"))
x2 <- factor(c(2, 2, 4, 3, 1, 4, 4, 4, 1))
x3 <- factor(c(FALSE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, TRUE))
x <- data.frame(x1 = x1, x2 = x2, x3 = x3)
initial <- empty(3, "bn")
prior <- priorUniform()
sampler <- BNSampler(data = x, initial = initial, prior = prior)
samples <- draw(sampler, n = 100, burnin = 10)
x <- bnpostmcmc(sampler, samples)
ep(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.