ergmx.S#
- ergmx.S(formula, attrs)[source]#
Evaluate
formulaon a subgraph, as ergm’s S().attrsis an R formula of the vertex attributes, as a string. One-sided, it picks the vertices of an induced subgraph:"~level == 'individual'"gives the network among individuals (directed if the network is). Two-sided, it picks two disjoint sets, and the formula is evaluated on the undirected bipartite network of the ties between them (in a directed network, of the arcs from the first set to the second, as ergm), whose first mode (b1terms) is the left-hand set:"(level == 'individual') ~ (level == 'organization')". Each side may also be a boolean array or 1-based vertex indices. In a formula string:"S(~edges + gwesp(0.5, fixed=TRUE), ~level == 'individual')". Names:S(level=="individual")~edges, as in ergm.