These functions include ways to take a census of the positions of nodes in a network:
node_by_tie() returns a census of the ties in a network.
For directed networks, out-ties and in-ties are bound together.
For multiplex networks, the various types of ties are bound together.
node_by_triad() returns a census of the triad configurations
nodes are embedded in.
node_by_tetrad() returns a census of nodes' positions
in motifs of four nodes.
node_by_path() returns the shortest path lengths
of each node to every other node in the network.
node_by_tie(.data)
node_by_dyad(.data)
node_by_triad(.data)
node_by_tetrad(.data)
node_by_path(.data)The nodal tetrad census counts the number of four-node configurations that each node is embedded in. 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(node_by_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
Davis, James A., and Samuel Leinhardt. 1967. “The Structure of Positive Interpersonal Relations in Small Groups.” 55.
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
Dijkstra, Edsger W. 1959. "A note on two problems in connexion with graphs". Numerische Mathematik 1, 269-71. doi:10.1007/BF01386390 .
Opsahl, Tore, Filip Agneessens, and John Skvoretz. 2010. "Node centrality in weighted networks: Generalizing degree and shortest paths". Social Networks 32(3): 245-51. doi:10.1016/j.socnet.2010.03.006 .
Other motifs:
motif_brokerage,
motif_diffusion,
motif_net
task_eg <- to_named(to_uniplex(ison_algebra, "tasks"))
(tie_cen <- node_by_tie(task_eg))
#> # A tibble: 16 × 33
#>   names   fromAlton fromBryce fromChester fromDrew fromEarnest fromFrancis
#>   <chr>       <dbl>     <dbl>       <dbl>    <dbl>       <dbl>       <dbl>
#> 1 Alton         0           0        0           0        0.3         0   
#> 2 Bryce         0           0        0           0        0           0   
#> 3 Chester       0           0        0           0        0.15        0.75
#> 4 Drew          0           0        0           0        0           0   
#> 5 Earnest       0.3         0        0.15        0        0           0.45
#> 6 Francis       0           0        0.6         0        0.75        0   
#> # ℹ 10 more rows
#> # ℹ 26 more variables: fromGlenda <dbl>, fromHarry <dbl>, fromIsla <dbl>,
#> #   fromJosue <dbl>, fromKinsley <dbl>, fromLeona <dbl>, fromMadison <dbl>,
#> #   fromNatalie <dbl>, fromOwen <dbl>, fromPriscilla <dbl>, toAlton <dbl>,
#> #   toBryce <dbl>, toChester <dbl>, toDrew <dbl>, toEarnest <dbl>,
#> #   toFrancis <dbl>, toGlenda <dbl>, toHarry <dbl>, toIsla <dbl>,
#> #   toJosue <dbl>, toKinsley <dbl>, toLeona <dbl>, toMadison <dbl>, …
node_by_dyad(ison_networkers)
#> # A tibble: 32 × 4
#>   names              Mutual Asymmetric  Null
#>   <chr>               <dbl>      <dbl> <dbl>
#> 1 Lin Freeman            29          2     1
#> 2 Doug White             21         10     1
#> 3 Ev Rogers               3          8    21
#> 4 Richard Alba           17          2    13
#> 5 Phipps Arabie           8         20     4
#> 6 Carol Barner-Barry     12          4    16
#> # ℹ 26 more rows
(triad_cen <- node_by_triad(task_eg))
#> # A tibble: 16 × 17
#>   names   X003  X012  X102 X021D X021U X021C X111D X111U X030T X030C  X201 X120D
#>   <chr>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Alton     23    11    39     0     0     0     2     2     0     0    17     0
#> 2 Bryce     21     6    47     0     0     0     5     6     0     0    10     0
#> 3 Chest…    34     3    46     0     0     0     2     1     0     0    13     0
#> 4 Drew      52     6    28     0     0     0     0     0     0     0    18     0
#> 5 Earne…    17    11    37     1     0     1     6     7     0     0    15     1
#> 6 Franc…    23     8    40     1     0     0     3     3     0     0    18     1
#> # ℹ 10 more rows
#> # ℹ 4 more variables: X120U <dbl>, X120C <dbl>, X210 <dbl>, X300 <dbl>
node_by_tetrad(ison_southern_women)
#> # A tibble: 18 × 12
#>   names        E4    I4    H4    L4    D4    U4    Y4    P4    C4    Z4    X4
#>   <chr>     <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Evelyn     1241  1347   176  1138   272     0   246     0    75     0     0
#> 2 Laura      1365  1389   180  1077   213     0   203     0    68     0     0
#> 3 Theresa    1333  1244   123  1137   286     0   281     0    91     0     0
#> 4 Brenda     1384  1356   176  1093   210     0   205     0    71     0     0
#> 5 Charlotte  1728  1562   157   836   117     0    74     0    21     0     0
#> 6 Frances    1840  1433   114   810   134     0   134     0    30     0     0
#> # ℹ 12 more rows
#> # A tibble: 14 × 12
#>   names    E4    I4    H4    L4    D4    U4    Y4    P4    C4    Z4    X4
#>   <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 E1     1877  1632    96   710   113     0    52     0    15     0     0
#> 2 E2     1886  1631    84   698   122     0    58     0    16     0     0
#> 3 E3     1368  1611   190  1006   168     0    98     0    54     0     0
#> 4 E4     1681  1673   131   784   138     0    64     0    24     0     0
#> 5 E5     1061  1557   232  1208   216     0   140     0    81     0     0
#> 6 E6     1085  1576   178  1142   287     0   156     0    71     0     0
#> # ℹ 8 more rows
node_by_path(ison_adolescents)
#> # A tibble: 8 × 9
#>   names Betty   Sue Alice  Jane  Dale   Pam Carol  Tina
#>   <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Betty     0     1     2     3     2     2     3     4
#> 2 Sue       1     0     1     2     1     1     2     3
#> 3 Alice     2     1     0     1     1     1     2     3
#> 4 Jane      3     2     1     0     1     2     3     4
#> 5 Dale      2     1     1     1     0     2     3     4
#> 6 Pam       2     1     1     2     2     0     1     2
#> # ℹ 2 more rows
node_by_path(ison_southern_women)
#> # A tibble: 18 × 33
#>   names  Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl  Ruth Verne
#>   <chr>   <dbl> <dbl>   <dbl>  <dbl>     <dbl>   <dbl>   <dbl> <dbl> <dbl> <dbl>
#> 1 Evelyn      0     2       2      2         2       2       2     2     2     2
#> 2 Laura       2     0       2      2         2       2       2     2     2     2
#> 3 There…      2     2       0      2         2       2       2     2     2     2
#> 4 Brenda      2     2       2      0         2       2       2     2     2     2
#> 5 Charl…      2     2       2      2         0       2       2     4     2     2
#> 6 Franc…      2     2       2      2         2       0       2     2     2     2
#> # ℹ 12 more rows
#> # ℹ 22 more variables: Myra <dbl>, Katherine <dbl>, Sylvia <dbl>, Nora <dbl>,
#> #   Helen <dbl>, Dorothy <dbl>, Olivia <dbl>, Flora <dbl>, E1 <dbl>, E2 <dbl>,
#> #   E3 <dbl>, E4 <dbl>, E5 <dbl>, E6 <dbl>, E7 <dbl>, E8 <dbl>, E9 <dbl>,
#> #   E10 <dbl>, E11 <dbl>, E12 <dbl>, E13 <dbl>, E14 <dbl>
#> # A tibble: 14 × 33
#>   names Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl  Ruth Verne
#>   <chr>  <dbl> <dbl>   <dbl>  <dbl>     <dbl>   <dbl>   <dbl> <dbl> <dbl> <dbl>
#> 1 E1         1     1       3      1         3       3       3     3     3     3
#> 2 E2         1     1       1      3         3       3       3     3     3     3
#> 3 E3         1     1       1      1         1       1       3     3     3     3
#> 4 E4         1     3       1      1         1       3       3     3     3     3
#> 5 E5         1     1       1      1         1       1       1     3     1     3
#> 6 E6         1     1       1      1         3       1       1     1     3     3
#> # ℹ 8 more rows
#> # ℹ 22 more variables: Myra <dbl>, Katherine <dbl>, Sylvia <dbl>, Nora <dbl>,
#> #   Helen <dbl>, Dorothy <dbl>, Olivia <dbl>, Flora <dbl>, E1 <dbl>, E2 <dbl>,
#> #   E3 <dbl>, E4 <dbl>, E5 <dbl>, E6 <dbl>, E7 <dbl>, E8 <dbl>, E9 <dbl>,
#> #   E10 <dbl>, E11 <dbl>, E12 <dbl>, E13 <dbl>, E14 <dbl>