Learn R Programming

sdnet (version 2.4.1)

cnCatnetFromEdges: catNetwork from Edges

Description

Creates a catNetwork object from list of nodes and edges.

Usage

cnCatnetFromEdges(nodes, edges, numcats=2)

Arguments

nodes

a vector of node names

edges

a list of node edges

numcats

an integer, the number of categories per node

Value

A catNetwork object

Details

The function uses a list of nodes and directional edges to create a catNetwork with specified (fixed) number of node categories. A random probability model is assigned, which can be changed later by cnSetProb for example. Note that cnSetProb takes a given data sample and changes both the node categories and their conditional probabilities according to it.

See Also

cnNew, cnCatnetFromSif, cnSetProb