node_x_clique() returns which maximal cliques each node belongs to.

A clique is a set of nodes every one of which is tied to every other, and it is maximal if no further node can be added without breaking that. Cliques are the strictest notion of a cohesive subgroup, and unlike the communities returned by node_in_*() functions they overlap: a node may belong to many cliques at once, or to none. That is why this returns an incidence table rather than a membership vector.

node_x_percolation() returns which communities of adjacent cliques each node belongs to, by clique percolation. These communities also overlap, but there are fewer of them than there are cliques, since cliques that share most of their nodes are joined.

node_x_clique(.data, min_clique_size = 3)

node_x_percolation(.data, min_clique_size = 3)

Arguments

.data

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().

min_clique_size

Integer, the minimum size of clique to return. By default 3, since dyads and isolates are trivially cliques. For a two-mode network, a vector of two values giving the minimum number of nodes from each mode, by default c(3, 3).

Value

A node_motif matrix with one row for each node in the network and a column for each motif type, giving the count of each motif in which each node participates. It is printed as a tibble, however, to avoid greedy printing. If the network is labelled, then the node names will be in a column named names.

Details

For signed networks, only the positive ties are considered. Since a clique is a maximally cohesive subgroup, negative ties cannot contribute to one. Use manynet::to_unsigned() first to control this yourself.

Bicliques

In a two-mode network no two nodes of the same mode are ever tied directly, so no set of them is a clique in the ordinary sense. The two-mode analogue is a biclique: a set of nodes from each mode such that every node of the one is tied to every node of the other. node_x_clique() detects these by connecting nodes that share a partner before searching, so that a biclique becomes an ordinary clique, and then keeping only those cliques with at least min_clique_size nodes from each mode.

Clique percolation

Clique percolation (Palla et al. 2005) treats two cliques as adjacent where they share all but one of min_clique_size nodes, so with the default of 3 where they share a tie. A community is then a set of cliques that can be reached from each other through such adjacent cliques, and a node belongs to every community that holds a clique it is in. A node in no clique of at least min_clique_size belongs to none.

References

On cliques

Luce, R. Duncan, and Albert D. Perry. 1949. "A method of matrix analysis of group structure". Psychometrika 14(2): 95-116. doi:10.1007/BF02289146

On clique percolation

Palla, Gergely, Imre Derényi, Illés Farkas, and Tamás Vicsek. 2005. "Uncovering the overlapping community structure of complex networks in nature and society". Nature 435(7043): 814-818. doi:10.1038/nature03607

Examples

node_x_clique(ison_adolescents)
#> # A tibble: 8 × 4
#>   names    C1    C2    C3
#>   <chr> <int> <int> <int>
#> 1 Betty     0     0     0
#> 2 Sue       0     1     1
#> 3 Alice     1     1     1
#> 4 Jane      1     0     0
#> 5 Dale      1     1     0
#> 6 Pam       0     0     1
#> # ℹ 2 more rows
node_x_clique(ison_southern_women, min_clique_size = c(3, 3))
#> # A tibble: 18 × 23
#>   names     C1    C2    C3    C4    C5    C6    C7    C8    C9   C10   C11   C12
#>   <chr>  <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int>
#> 1 Evelyn     1     0     0     0     0     0     0     0     0     1     0     1
#> 2 Laura      1     0     0     0     0     0     0     0     0     0     0     0
#> 3 There…     1     0     0     0     0     0     0     0     0     1     1     1
#> 4 Brenda     0     0     0     0     0     0     0     0     0     1     1     1
#> 5 Charl…     0     0     0     0     0     0     0     0     0     1     1     0
#> 6 Franc…     0     0     0     0     0     0     0     0     0     0     0     0
#> # ℹ 12 more rows
#> # ℹ 10 more variables: C13 <int>, C14 <int>, C15 <int>, C16 <int>, C17 <int>,
#> #   C18 <int>, C19 <int>, C20 <int>, C21 <int>, C22 <int>
#> # A tibble: 14 × 23
#>   names    C1    C2    C3    C4    C5    C6    C7    C8    C9   C10   C11   C12
#>   <chr> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int> <int>
#> 1 E1        0     0     0     0     0     0     0     0     0     0     0     0
#> 2 E2        1     0     0     0     0     0     0     0     0     0     0     0
#> 3 E3        1     0     0     0     0     0     0     0     0     1     1     1
#> 4 E4        0     0     0     0     0     0     0     0     0     1     1     1
#> 5 E5        1     0     0     0     0     0     0     0     0     1     1     1
#> 6 E6        1     0     0     0     0     0     0     0     0     0     0     1
#> # ℹ 8 more rows
#> # ℹ 10 more variables: C13 <int>, C14 <int>, C15 <int>, C16 <int>, C17 <int>,
#> #   C18 <int>, C19 <int>, C20 <int>, C21 <int>, C22 <int>
node_x_percolation(ison_adolescents)
#> # A tibble: 8 × 2
#>   names    C1
#>   <chr> <int>
#> 1 Betty     0
#> 2 Sue       1
#> 3 Alice     1
#> 4 Jane      1
#> 5 Dale      1
#> 6 Pam       1
#> # ℹ 2 more rows