logScoreNormal.bn: Normal-inverse-gamma (with g-prior) Log marginal likelihood.

Description Usage Arguments Details Value See Also Examples

View source: R/score-normal.R

Description

Compute the log marginal likelihood of the supplied Bayesian Network.

Usage

1
2
3
  ## S3 method for class 'bn'
 logScoreNormal(x, data,
    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.

data

A matrix with columns giving the value of each random variable.

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.

...

Further arguments, currently unused

Details

The data is scored as continuous, using a form of the Normal Prior.

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

logScoreNormal, logScoreNormal.bn.list

Examples

1
2
3
data <- cbind(c(-10, -2), c(-11, -4))
net <- bn(integer(0), 1)
logScoreNormal(net, data)

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