Learn R Programming

deal (version 1.1-2)

addarrows: Add arrows to/from node

Description

Create networks with all possible arrows to/from nodes with smaller indices added

Usage

addarrows(nw, node, data, prior,trylist=rep(list(NULL),nw$n))

Arguments

nw
Network in which arrows are inserted.
node
The index of the node in focus.
data
Dataframe used for learning the network, see network.
prior
A joint prior, see jointprior.
trylist
Used internally for reusing learning of nodes, see maketrylist.

Value

  • A list with two elements
  • nwA networkfamily with all created networks. All networks have been learned.
  • trylistUpdated.

Details

Used in networkfamily when constructing all possible networks for a given node configuration. Tries to insert all possible arrows to (from) the node in focus from (to) nodes with smaller indices. Each arrow combination gives rise to extra networks.

References

Further information about Deal can be found at: http://www.math.auc.dk/novo/deal.

See Also

networkfamily,addarrow

Examples

Run this code
data(rats)
rats.nw    <- network(rats)
rats.prior <- jointprior(rats.nw,12)
rats.nwl   <- addarrows(rats.nw,3,rats,rats.prior)$nw
plot(rats.nwl)

Run the code above in your browser using DataLab