cohesion_strong {pald} | R Documentation |
Cohesion Matrix: Strong Ties
Description
Provides the symmetrized and thresholded matrix of cohesion values.
Usage
cohesion_strong(c, symmetric = TRUE)
Arguments
c |
A |
symmetric |
Logical. Whether the returned matrix should be made
symmetric (using the minimum); the default is |
Details
The threshold is that provided by strong_threshold (and is equal to half of
the average of the diagonal of c
).
Values of the cohesion matrix which are less than the threshold are set to
zero.
The symmetrization, if desired, is computed using the entry-wise (parallel)
minimum of C and its transpose (i.e., min(C_ij, C_ji)
).
The matrix provided by cohesion_strong (with default symmetric = TRUE
) is
the adjacency matrix for the graph of strong ties (the cluster graph), see
community_graphs
and pald
.
Value
The symmetrized cohesion matrix in which all entries corresponding to weak ties are set to zero.
Examples
C <- cohesion_matrix(dist(exdata2))
strong_threshold(C)
cohesion_strong(C)
## To illustrate the calculation performed
C_strong <- C
## C_strong is equal to cohesion_strong(C, symmetric = FALSE)
C_strong[C < strong_threshold(C)] <- 0
## C_strong_sym is equal to cohesion_strong(C)
C_strong_sym <- pmin(C_strong, t(C_strong))
## The (cluster) graph whose adjacency matrix, CS,
## is the matrix of strong ties
CS <- cohesion_strong(C)
if (requireNamespace("igraph", quietly = TRUE)) {
G_strong <- igraph::simplify(
igraph::graph.adjacency(CS, weighted = TRUE, mode = "undirected")
)
plot(G_strong)
}