exactposterior: Posterior distribution on Bayesian networks.

Description Usage Arguments Value See Also

View source: R/post.R

Description

Use one of a number of methods to get the posterior distribution

Usage

1
2
3
4
5
6
  exactposterior(data,
    prior = priorUniform(empty(ncol(data), "bn")),
    logScoreFUN = logScoreMultDirFUN(),
    logScoreParameters = list(hyperparameters = "bdeu"),
    constraint = NULL, maxNumberParents = NULL,
    verbose = T)

Arguments

data

The data.

prior

A list of functions of the same length as initial that returns the local prior score of the corresponding node, given a numeric vector of parents. The default value NULL uses an improper uniform prior.

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.

logScoreParameters

A list of parameters that are passed to logScoreFUN.

constraint

A matrix of dimension ncol(data) x ncol(data) giving constraints to the sample space. The (i, j) element is 1 if the edge i -> j is required -1 if the edge i -> is excluded. 0 if the edge i -> j is not constrained. The diagonal of constraint must be all 0.

maxNumberParents

Integer of length 1. The maximum number of parents of any node. A NULL value uses the ncol(data) - 1.

verbose

A logical. Should a progress bar be displayed?

Value

A bnpost object.

See Also

posterior. Example priors priorGraph, priorUniform.


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