Learn R Programming

deal (version 1.1-1)

networkfamily: Collection of networks

Description

Methods for handling a range of networks. These may be plottet, printed or output in LaTeX format. Also functions for sorting and thinning on the basis of the network-score is defined.

Usage

networkfamily(data,nw=network(data), prior=jointprior(nw),
              trylist=rep(list(NULL),nw$n), timetrace=TRUE) 

## S3 method for class 'networkfamily':
print(x,...)
## S3 method for class 'networkfamily':
plot(x,
        layout=rep(min(1+floor(sqrt(length(nwf))),5),2),
        cexscale=5,arrowlength=0.1,scale=10,sscale=.7*scale,...)

Arguments

nw
The inital (often without arrows) network from which the full networkfamily is generated.
data
Dataframe used for learning the parameters in each network.
prior
A joint prior. See jointprior.
trylist
Used internally for reusing learning of nodes. See maketrylist.
timetrace
For timing purposes.
x
A networkfamily.
layout
2-dimensional vector of the number of plots in the rows and columns of each plotting page.
cexscale
arrowlength
scale
sscale
...
Other plot parameters passed to plot.network.

Value

  • The function networkfamily returns list with two components
  • nwThe networkfamily.
  • trylistAn updated trylist (see maketrylist).

Details

networkfamily generates and learns all possible networks with the nodes given as in the initial network nw. This is done by successively trying to generate the networks with all possible arrows to/from each node (see addarrows). If there is a banlist present in nw (see network), then this is respected. After generation of all possible networks, a test for cycles (see cycletest) is performed and only networks with directed acyclic graphs are returned.

References

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

See Also

network, genlatex, heuristic, nwfsort, nwfunique, elementin, addarrows, cycletest

Examples

Run this code
data(rats)
allrats <- networkfamily(rats)$nw
plot(allrats)
print(allrats)

Run the code above in your browser using DataLab