These functions offer ways to summarise the heterogeneity of an attribute across a network, within groups of a network, or the distribution of ties across this attribute.
graph_blau_index(object, attribute, clusters = NULL)
graph_ei_index(object, attribute)
graph_assortativity(object)
An object of a migraph-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
The name of a vertex attribute to measure the diversity of.
A nodal cluster membership vector or name of a vertex attribute.
graph_blau_index
: Calculates the heterogeneity of ties across a network or
within clusters by node attributes
graph_ei_index
: Calculates the embeddedness of a node within the group
of nodes of the same attribute
graph_assortativity
: Calculates the degree assortativity in a graph
Other measures:
centralisation
,
centrality
,
closure
,
cohesion()
,
features
,
holes
marvel_friends <- to_unsigned(ison_marvel_relationships, "positive")
graph_blau_index(marvel_friends, "Gender")
#> [1] 0.306
graph_blau_index(marvel_friends, "Attractive")
#> [1] 0.35
graph_blau_index(marvel_friends, "Gender", "Rich")
#> [1] 0.337 0.165
graph_ei_index(marvel_friends, "Gender")
#> [1] -0.285
graph_ei_index(marvel_friends, "Attractive")
#> [1] -0.632
graph_assortativity(mpn_elite_mex)
#> [1] -0.176