tp.bnpost: Transition probabilities.

Description Usage Arguments Value See Also Examples

View source: R/post-exact.R

Description

Computes the matrix transition probabilities for the specified sampler.

Usage

1
2
3
  ## S3 method for class 'bnpost'
 tp(x, sampler = "mh", allowFlips = T,
    verbose = F, ...)

Arguments

x

An object of class "bnpost"

sampler

Which sampler to use. Only "mh" for Metropolis-Hastings is implemented

allowFlips

A logical of length 1, specifying whether the sampler is allowed to reverse the direction of single edges?

verbose

...

...

Further arguments (unused)

Value

A matrix of transition probabilities.

See Also

tp

Examples

1
2
3
4
5
6
7
8
9
x1 <- factor(c(1, 1, 0, 1))
x2 <- factor(c(0, 1, 0, 1))
dat <- data.frame(x1 = x1, x2 = x2)

bnspace <- enumerateBNSpace(2)
lsmd <- logScoreMultDir(bnspace, data = dat, hyperparameters = "bdeu")
post <- bnpost(bnspace = bnspace, logScore = lsmd, data = dat)

tp(post)

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