Calculates boundary connectivity for networks with an arbitrary number of groups. Boundary connectivity captures the behaviour of boundary nodes, i.e. nodes that interact with the other groups. A node is a boundary node if and only if it has at least one edge to a node in a different group and at least one edge to a member of its own group that is not connected to any node belonging to another group. The index is computed as the average, across boundary nodes, of the ratio of within-group edges to total edges. An expected value under a null model is then subtracted from this average.
Usage
boundary_connectivity(
g,
vattr,
null_models = NULL,
relax = FALSE,
mode = c("out", "in")
)Arguments
- g
An
igraphgraph object.- vattr
Group memberships: either a character scalar naming a vertex attribute of
g, or an atomic vector of lengthigraph::vcount(g). Non-numeric values are coerced through a factor.- null_models
A list of
igraphgraph objects for baseline comparison.- relax
Logical. If TRUE, uses the relaxed definition of a boundary node.
- mode
Character,
"out"(default) or"in". For directed graphs, whether boundary nodes and their ties are defined using outgoing or incoming ties. Ignored, with a warning, for undirected graphs.
Details
When relax = TRUE the function uses the relaxed definition of a node is
considered on the boundary if it is connected to a group other than its own
and is also connected to at least one node from its own group, even if the
node it is connected to is also a boundary node.
