tie_by_diversity() measures the heterogeneity of the nodes
that each tie joins.
For a tie between two nodes, this is the diversity of its two ends.
For a hypergraph, it is the diversity of the members of each hyperedge,
and these are the values that node_by_diversity() gives
the hyperedges in the two-mode form of the hypergraph.
A tie without members returns NA.
A summary of the tie measure then describes the network as a whole.
tie_by_diversity(
.data,
attribute,
diversity = c("blau", "teachman", "variation", "gini", "rao"),
normalized = TRUE,
distance = NULL
)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().
Name of a nodal attribute, mark, measure, or membership vector. Where none is named and the network holds only one nodal attribute besides the reserved ones, such as "label" and "mode", that one is used.
Which method to use for *_diversity().
Either "blau" (Blau's index), "teachman" (Teachman's index),
or "rao" (Rao-Stirling diversity) for categorical attributes,
or "variation" (coefficient of variation) or "gini" (Gini coefficient) for numeric attributes.
Default is "blau".
If an incompatible method is chosen for the attribute type,
a suitable alternative will be used instead with a message.
Logical scalar, whether Blau's index is divided by its maximum for the attribute, \(1 - 1/k\), where \(k\) is the number of categories the attribute holds in the network. The index then runs from 0 to 1 whatever the number of categories, as the index of qualitative variation does (Agresti and Agresti 1978). The other indices are left as they are. By default TRUE.
For diversity = "rao", the distances among the
categories of the attribute: a matrix whose row and column names are the
categories, or a one-mode network of the categories,
with values between 0 (the same) and 1 (the most different).
By default NULL, so every two categories are 1 apart.
A tie_measure numeric vector the length of the ties in the network,
providing the scores for each tie.
If the network is labelled,
then the scores will be labelled with the ties' adjacent nodes' names.
The object also carries the measure it computed, the range its values
can fall within, and whether and how those values were normalized.
These are shown as a one-line header when the object is printed.
Where a measure offers a choice between several ways of counting the
same thing, it also carries the variant it used.
All can be retrieved with attr().
Other diversity:
measure_assort_net,
measure_assort_node,
measure_diverse_dispersion,
measure_diverse_net,
measure_diverse_node,
motif_composition,
motif_homophily
Other measures:
measure_accuracy_net,
measure_accuracy_node,
measure_assort_net,
measure_assort_node,
measure_breadth,
measure_broker_node,
measure_brokerage,
measure_central_between,
measure_central_close,
measure_central_degree,
measure_central_eigen,
measure_central_tie_between,
measure_central_tie_close,
measure_central_tie_degree,
measure_central_tie_eigen,
measure_closure,
measure_closure_node,
measure_cohesion,
measure_core,
measure_diffusion_infection,
measure_diffusion_net,
measure_diffusion_node,
measure_diverse_dispersion,
measure_diverse_net,
measure_diverse_node,
measure_domain,
measure_features,
measure_fit,
measure_fragmentation,
measure_hierarchy,
measure_opinion,
measure_periods,
tie_by_width()
Other tie:
mark_dyads,
mark_select_tie,
mark_ties,
mark_triangles,
measure_central_tie_between,
measure_central_tie_close,
measure_central_tie_degree,
measure_central_tie_eigen,
member_community_link,
tie_by_width()
tie_by_diversity(ison_lawfirm, "gender")
#> # Blau's index, normalized [0, 1]
#> `1->2` `1->2` `1->4` `1->8` `1->17` `1->17` `1->17` `1->20` `1->39` `1->40`
#> 1 0 0 0 0 0 0 0 0 1 0
#> # ... and 2561 more values from this nodeset. Use `print_all(...)` to print all values.
tie_by_diversity(to_hypergraph(ison_southern_women), "Title")
#> # Blau's index, normalized [0, 1]
#> E1 E2 E3 E4 E5 E6 E7 E8 E9 E10 E11 E12 E13
#> 1 0.889 0.889 0.556 0.75 0.438 0.75 0.84 0.816 1 0.96 0 1 0.889
#> # ... and 1 more values from this nodeset. Use `print_all(...)` to print all values.