Learn R Programming

catnet (version 1.16.1)

cnMatParents-method: Network Parent Matrix

Description

Returns the binary matrix of parent-child relations of a catNetwork object.

Usage

cnMatParents(object, nodeorder)

Value

A matrix

Arguments

object

a catNetwork or catNetworkFit object

nodeorder

an integer vector specifying the order of the nodes to be taken

Author

N. Balov, P. Salzman

Details

The resulting matrix has a value 1 at row i and column j if i-th node has j-th node as a parent, and 0 otherwise.

See Also

cnParents, cnMatEdges

Examples

Run this code
  library(catnet)
  cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2)
  cnMatParents(object=cnet)

Run the code above in your browser using DataLab