BNSamplerBigFlips: Big flips MCMC sampler for Bayesian networks.

Description Usage Arguments Details Value See Also

View source: R/mcmc-bigflips.R

Description

Create a MCMC sampler for Bayesian Networks. The sampler samples Bayesian Networks (ie models).

Usage

1
2
3
4
  BNSamplerBigFlips(data, initial, prior,
    return = "network", logScoreFUN = logScoreMultDirFUN(),
    logScoreParameters = list(hyperparameters = "bdeu"),
    verbose = F, keepTape = F)

Arguments

data

The data.

initial

An object of class 'bn'. The starting value of the MCMC.

prior

A function that returns the prior score of the supplied bn.

return

Either "network" or "contingency".

logScoreFUN

A list of four elements:

offline

A function that computes the logScore of a Bayesian Network

online

A function that incrementally computes the logScore of a Bayesian Network

local

A function that computes the local logScore of a Bayesian Network

prepare

A function that prepares the data, and any further pre-computation required by the logScore functions.

For Multinomial-Dirichlet models, logScoreMultDirFUN returns the appropriate list; for Normal models with Zellner g-priors, logScoreNormalFUN returns the appropriate list.

logScoreParameters

...

verbose

A logical of length 1, indicating whether verbose output should be printed.

keepTape

A logical of length 1, indicating whether a full log ('tape') of the MCMC sampler should be kept. Enabling this option can be very memory-intensive.

Details

.....

Value

A function, which when called draws the next sample of the MCMC.

See Also

BNSampler, BNSamplerPT, BNSamplerMJ, BNSamplerGrzeg


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