Skip to contents

Functions that transform an object of class bn.fit and bn.fit.gnet (a Gaussian Bayesian network) to objects of class GBN or CI.

Usage

bn2gbn(bnfit)

bn2ci(bnfit)

Arguments

bnfit

object of class bn.fit.

Value

The function bn2gbn returns an object of class GBN consisting of a list with entries:

  • order: An ordering of the nodes according to the graph.

  • mean: The mean vector of the Gaussian distribution.

  • covariance: The covariance matrix of the Gaussian distribution.

The function bn2ci returns an object of class CI consisting of the same list as GBN, but with the additional entry cond_ind. cond_ind is a list where each entry consists of A, B and C corresponding to the conditional independence statements A independent of B given C embedded by the network.