ep: Posterior edge probabilities.

Description Usage Arguments See Also Examples

View source: R/post.R

Description

Compute the posterior edge probabilities, as given by the supplied object.

Usage

1
  ep(x, ...)

Arguments

x

An object

...

Further arguments, passed to method

See Also

ep.bnpostmcmc.list, ep.parental.list, ep.bnpost, ep.table, ep.parental.contingency

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
x1 <- factor(c(1, 1, 0, 1))
x2 <- factor(c(0, 1, 0, 1))
dat <- data.frame(x1 = x1, x2 = x2)

initial <- bn(c(), c())
prior <- priorUniform(initial)

sampler <- BNSampler(dat, initial, prior)
samples <- draw(sampler, n = 50)
mpost <- bnpostmcmc(sampler, samples)

ep(mpost)

initial <- bn(c(), c(1))
sampler2 <- BNSampler(dat, initial, prior)
samples2 <- draw(sampler2, n = 50)
mpost2 <- bnpostmcmc(sampler2, samples2)

ep(bnpostmcmc.list(mpost, mpost2))

rjbgoudie/structmcmc documentation built on Nov. 3, 2020, 3:41 a.m.