These functions include ways to take a census of the graphlets in a network:
net_x_dyad() returns a census of dyad motifs in a network.
net_x_triad() returns a census of triad motifs in a network.
net_x_tetrad() returns a census of tetrad motifs in a network.
See also graph classes.
net_x_dyad(.data)
net_x_triad(.data, object2 = NULL)
net_x_tetrad(.data)Mixed census adapted from Alejandro Espinosa 'netmem'
A network object of class stocnet, igraph, tbl_graph, network, or similar.
Internally any of these will be coerced to an efficient implementation.
For more information on possible coercions, see e.g. manynet::as_stocnet().
A second, two-mode network object.
Only net_x_triad() uses this, and only to take a multilevel census;
see its Mixed census section.
A network_motif named numeric vector or sometimes a data frame with
one row and a column for each motif type,
giving the count of each motif in the network.
This is printed as a tibble to avoid greedy printing of long vectors.
net_x_triad() takes the mixed census on a multiplex network,
splitting it into layers by mode rather than by position.
To census one layer alone, take it first with manynet::to_uniplex().
net_x_dyad() and net_x_tetrad() count every tie whatever its layer.
The dyad census counts the number of mutual, asymmetric, and null dyads in a network. For directed networks,
Mutual dyads have ties in both directions
Asymmetric dyads have a tie in one direction only
Null dyads have no ties
Note that for undirected and two-mode networks, only mutual and null dyads are possible, as the concept of an asymmetric dyad does not apply.
The triad census counts the number of three-node configurations in the network. The function returns a matrix with a special naming convention:
003: This is an empty triad; no ties
012: This triad includes one tie
102: This triad includes two ties, but they are not reciprocated
021D: This triad includes two ties, one of which is reciprocated, and the other is directed towards the reciprocated tie
021U: This triad includes two ties, one of which is reciprocated, and the other is directed away from the reciprocated tie
021C: This triad includes two ties, one of which is reciprocated, and the other is directed between the two non-reciprocated nodes
111D: This triad includes three ties, two of which are reciprocated, and the other is directed towards the reciprocated ties
111U: This triad includes three ties, two of which are reciprocated, and the other is directed away from the reciprocated ties
030T: This triad includes three ties, all of which are directed in a transitive manner (i.e. A->B, B->C, A->C)
030C: This triad includes three ties, all of which are directed in a cyclic manner (i.e. A->B, B->C A->C)
201: This triad includes three ties, all of which are reciproc ated (i.e. A<->B, B<->C, A<->C)
120D: This triad includes four ties, three of which are reciprocated, and the other is directed towards the reciprocated ties
120U: This triad includes four ties, three of which are reciprocated, and the other is directed away from the reciprocated ties
120C: This triad includes four ties, three of which are reciprocated, and the other is directed between the two non-reciprocated
210: This triad includes five ties, four of which are reciprocated, and the other is directed between the two non-reciprocated
300: This triad includes six ties, all of which are reciprocated
Note that for undirected and two-mode networks, only 003, 102, and 201 are possible, as the other configurations rely on the concept of directionality.
Where a one-mode and a two-mode network are given together,
a multilevel census of the triads that span them is taken instead,
after Hollway et al. (2017).
Its ten motifs are labelled by how many ties join the pair of nodes at
each level, so that "21" counts triads whose two nodes are reciprocally
tied in the one-mode network and share a partner in the two-mode network.
There are two ways to ask for it.
Supply the two networks as .data and object2,
the one-mode network first.
Or give a single multiplex network holding exactly one one-mode layer and
one two-mode layer, such as fict_marvel,
and the two layers are used in that order.
A two-mode network that carries no one-mode layer is not enough,
and remains unavailable.
Since a census counts configurations, only the presence of a tie counts.
Weights and signs are set aside, as igraph::triad_census() also does.
node_x_triad() reports the same ten motifs for each node.
The tetrad census counts the number of four-node configurations in the network. The function returns a matrix with a special naming convention:
E4 (aka co-K4): This is an empty set of four nodes; no ties
I4 (aka co-diamond): This is a set of four nodes with just one tie
H4 (aka co-C4): This set of four nodes includes two non-adjacent ties
L4 (aka co-paw): This set of four nodes includes two adjacent ties
D4 (aka co-claw): This set of four nodes includes three adjacent ties, in the form of a triangle with one isolate
U4 (aka P4, four-actor line): This set of four nodes includes three ties arranged in a line
Y4 (aka claw): This set of four nodes includes three ties all adjacent to a single node
P4 (aka paw, kite): This set of four nodes includes four ties arranged as a triangle with an extra tie hanging off of one of the nodes
C4 (aka bifan): This is a symmetric box or 4-cycle or set of shared choices
Z4 (aka diamond): This resembles C4 but with an extra tie cutting across the box
X4 (aka K4): This resembles C4 but with two extra ties cutting across the box; a realisation of all possible ties
Graphs of these motifs can be shown using
plot(net_x_tetrad(ison_southern_women)).
Holland, Paul W., and Samuel Leinhardt. 1970. "A Method for Detecting Structure in Sociometric Data". American Journal of Sociology, 76: 492-513. doi:10.1016/B978-0-12-442450-0.50028-6
Wasserman, Stanley, and Katherine Faust. 1994. "Social Network Analysis: Methods and Applications". Cambridge: Cambridge University Press.
Davis, James A., and Samuel Leinhardt. 1967. “The Structure of Positive Interpersonal Relations in Small Groups.” 55.
Hollway, James, Alessandro Lomi, Francesca Pallotti, and Christoph Stadtfeld. 2017. “Multilevel Social Spaces: The Network Dynamics of Organizational Fields.” Network Science 5(2): 187–212. doi:10.1017/nws.2017.8
Ortmann, Mark, and Ulrik Brandes. 2017. “Efficient Orbit-Aware Triad and Quad Census in Directed and Undirected Graphs.” Applied Network Science 2(1):13. doi:10.1007/s41109-017-0027-2 .
McMillan, Cassie, and Diane Felmlee. 2020. "Beyond Dyads and Triads: A Comparison of Tetrads in Twenty Social Networks". Social Psychology Quarterly 83(4): 383-404. doi:10.1177/0190272520944151
Other cohesion:
mark_triangles,
measure_breadth,
measure_cohesion,
measure_fragmentation,
motif_node
Other motifs:
motif_brokerage_net,
motif_brokerage_node,
motif_clique,
motif_composition,
motif_exposure,
motif_hazard,
motif_hierarchy,
motif_homophily,
motif_node,
motif_path,
motif_periods
net_x_dyad(manynet::ison_algebra)
#> # A tibble: 1 × 3
#> Mutual Asymmetric Null
#> <dbl> <dbl> <dbl>
#> 1 68 8 44
net_x_triad(manynet::ison_adolescents)
#> # A tibble: 1 × 6
#> `003` `012` `102` `201` `210` `300`
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 13 0 29 11 0 3
net_x_triad(fict_marvel)
#> # A tibble: 1 × 10
#> `22` `21` `20` `12` `11D` `11U` `10` `02` `01` `00`
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 1248 0 1591 10289 0 0 19549 47683 0 113938
net_x_tetrad(ison_southern_women)
#> # A tibble: 1 × 11
#> E4 I4 H4 L4 D4 U4 Y4 P4 C4 Z4 X4
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 12388 0 11869 0 0 0 0 0 7458 0 2758