logScoreMultDirOffline: Multinomial-Dirichlet Log marginal likelihood (offline).

Description Usage Arguments Details Value See Also

View source: R/score-multdir.R

Description

Compute the log marginal likelihood of the supplied Bayesian Network.

Usage

1
2
  logScoreMultDirOffline(x, logScoreParameters,
    cache = new.env(hash = T), checkInput = T)

Arguments

x

An object of class "bn". The Bayesian Network by for which the marginal likelihood is computed.

logScoreParameters

A list with the following components:

data

A matrix (NOT data.frame), with columns being integers in the range 0, 1, 2, .... giving the values of each random variable. **** The integers MUST start numbering at 0 NOT 1 ****

nl

A numeric vector of length ncol(data), specifying the number of levels that each random variable takes.

hyperparameters

A character vector of length one. Either "bdeu", "qi", "one", or "point9"

cache

Optionally, provide an environment with cached local scores for this data.

checkInput

A logical of length 1, specifying whether to check the inputs to the function.

Details

This function is an alternative interface to logScoreMultDir. This interface is required by the MCMC sampler.

Value

A numeric vector of length 1, giving the log marginal likelihood. The environment 'cache' will also be updated because its scope is global.

See Also

logScoreMultDir, logScoreMultDirIncremental


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