Learn R Programming

sparsebnUtils (version 0.0.8)

specify.prior: Build a black list based on prior knowledge

Description

Utility for specifying known root and leaf nodes in a network, to be used in conjunction with the blacklist argument of network estimation methods.

Usage

specify.prior(roots = NULL, leaves = NULL, nodes, indices = FALSE)

Arguments

roots

Vector of root nodes. May be character or integer.

leaves

Vector of leaf nodes. May be character or integer.

nodes

Full vector of node names of the entire network. Both roots and leaves must be a subset of this vector.

indices

Logical: Return indices or character names?

Details

Builds an (m+k)x2 matrix, where m is the number of user-specified root nodes and k is the number of user-specified leaf nodes.

  • A root node is any node without any parents, i.e. with no incoming edges.

  • A leaf node is any node without any children, i.e. with no outgoing edges.