These functions combine an appropriate node_by_*() function together with methods for calculating the hierarchical clusters provided by a certain distance calculation.

  • node_in_equivalence() assigns nodes membership based on their equivalence with respective to some census/class. The following functions call this function, together with an appropriate census.

    • node_in_structural() assigns nodes membership based on their having equivalent ties to the same other nodes.

    • node_in_regular() assigns nodes membership based on their having equivalent patterns of ties.

    • node_in_automorphic() assigns nodes membership based on their having equivalent distances to other nodes.

A plot() method exists for investigating the dendrogram of the hierarchical cluster and showing the returned cluster assignment.

node_in_equivalence(
  .data,
  census,
  k = c("silhouette", "elbow", "strict"),
  cluster = c("hierarchical", "concor"),
  distance = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
  range = 8L
)

node_in_structural(
  .data,
  k = c("silhouette", "elbow", "strict"),
  cluster = c("hierarchical", "concor"),
  distance = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
  range = 8L
)

node_in_regular(
  .data,
  k = c("silhouette", "elbow", "strict"),
  cluster = c("hierarchical", "concor"),
  distance = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
  range = 8L
)

node_in_automorphic(
  .data,
  k = c("silhouette", "elbow", "strict"),
  cluster = c("hierarchical", "concor"),
  distance = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
  range = 8L
)

Arguments

.data

An object of a manynet-consistent class:

  • matrix (adjacency or incidence) from {base} R

  • edgelist, a data frame from {base} R or tibble from {tibble}

  • igraph, from the {igraph} package

  • network, from the {network} package

  • tbl_graph, from the {tidygraph} package

census

A matrix returned by a node_by_*() function.

k

Typically a character string indicating which method should be used to select the number of clusters to return. By default "silhouette", other options include "elbow" and "strict". "strict" returns classes with members only when strictly equivalent. "silhouette" and "elbow" select classes based on the distance between clusters or between nodes within a cluster. Fewer, identifiable letters, e.g. "e" for elbow, is sufficient. Alternatively, if k is passed an integer, e.g. k = 3, then all selection routines are skipped in favour of this number of clusters.

cluster

Character string indicating whether clusters should be clustered hierarchically ("hierarchical") or through convergence of correlations ("concor"). Fewer, identifiable letters, e.g. "c" for CONCOR, is sufficient.

distance

Character string indicating which distance metric to pass on to stats::dist. By default "euclidean", but other options include "maximum", "manhattan", "canberra", "binary", and "minkowski". Fewer, identifiable letters, e.g. "e" for Euclidean, is sufficient.

range

Integer indicating the maximum number of (k) clusters to evaluate. Ignored when k = "strict" or a discrete number is given for k.

Examples

# \donttest{
(nse <- node_in_structural(ison_algebra))
#> 4 groups
#>   V1    V2    V3    V4    V5    V6    V7    V8    V9    V10   V11   V12   V13  
#> 1 A     B     C     A     C     C     B     B     A     A     C     A     B    
#> # ... with 3 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
plot(nse)

# }
# \donttest{
(nre <- node_in_regular(ison_southern_women,
  cluster = "concor"))
#> 8 groups
#>   Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl Ruth  Verne Myra 
#> 1 A      B     A       B      C         C       C       D     C     C     C    
#> # ... with 7 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
#>   E1    E2    E3    E4    E5    E6    E7    E8    E9    E10   E11   E12   E13  
#> 1 E     E     F     E     G     F     G     H     H     E     E     F     E    
#> # ... with 1 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
plot(nre)

# }
# \donttest{
(nae <- node_in_automorphic(ison_southern_women,
  k = "elbow"))
#> 5 groups
#>   Evelyn Laura Theresa Brenda Charlotte Frances Eleanor Pearl Ruth  Verne Myra 
#> 1 A      A     A       A      A         B       B       C     C     C     D    
#> # ... with 7 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
#>   E1    E2    E3    E4    E5    E6    E7    E8    E9    E10   E11   E12   E13  
#> 1 A     A     A     A     A     B     B     B     E     D     D     D     D    
#> # ... with 1 more values from this nodeset unprinted. Use `print(..., n = Inf)` to print all values.
plot(nae)

# }