ergmx.Networks#
- ergmx.Networks(*networks, bipartite=None)[source]#
Several networks to model jointly, as R’s
ergm.multi::Networks().The networks keep their vertex attributes; inside
N(), each network’s terms are evaluated on that network, and the operator’s linear model can use network-level attributes (igraph’s graph attributes or networkx’sG.graph), the network sizen,.NetworkID(1, 2, …) and.NetworkName. Terms outside N() are evaluated on the networks combined, as in ergm.multi.- Parameters:
*networks (
igraph.Graphornetworkx.Graph) – The networks, as arguments, a list, or a dict whose keys name them. They must be all directed or all undirected, and can differ in size.bipartite (
strorbool, optional) – For bipartite networks, the vertex attribute with each vertex’s mode, as inergmx.ergm().
Examples
>>> from ergmx import datasets >>> monks = ergmx.Networks(datasets.load("samplk1"), datasets.load("samplk2")) >>> ergmx.ergm(monks, "N(~edges + mutual)")