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

Description Usage Arguments Details Value See Also

View source: R/score-normal.R

Description

Compute the difference in log marginal likelihood of the supplied Bayesian Networks, quickly.

Usage

1
2
  logScoreNormalIncremental(currentBN, proposalBN, heads,
    logScoreParameters, cache, checkInput = T)

Arguments

currentBN

An object of class "bn".

proposalBN

An object of class "bn".

heads

A numeric vector, specifying which nodes have different parents in currentBN and proposalBN.

logScoreParameters

A list with the following components:

data

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

nl

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

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 is a fast, incremental version of logScoreNormal.

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

Value

logscore(proposalBN) - logscore(currentBN)

See Also

logScoreNormal, logScoreNormalOffline


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