These functions measure how far apart the values of a numeric nodal attribute are, such as the opinions at the end of an opinion dynamic:

  • net_by_polarisation() measures how far the values are from their mean, as the mean of the squared differences from the mean, \(\frac{1}{n} \sum_i (x_i - \bar{x})^2\).

  • net_by_disagreement() measures how much tied nodes differ, as the mean over the ties of the weighted squared differences between the two ends, \(\frac{1}{m} \sum_{ij} w_{ij} (x_i - x_j)^2\).

These follow the definitions of Musco, Musco and Tsourakakis (2018), divided by the number of nodes or ties so that networks of different sizes can be compared. A network can be polarised with little disagreement, where each camp keeps to itself, or disagree much with little polarisation.

They measure the spread of a numeric attribute. For the polarisation of a structure, into groups and the ties between them, see net_by_factions(). The values can be observed opinions, the opinions from node_by_opinion(), or the result of manynet::play_opinion().

net_by_polarisation(.data, attribute)

net_by_disagreement(.data, attribute)

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

attribute

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.

Value

A network_measure numeric score.

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

References

On polarisation and disagreement

Musco, Cameron, Christopher Musco, and Charalampos E. Tsourakakis. 2018. "Minimizing polarization and disagreement in social networks". Proceedings of the 2018 World Wide Web Conference: 369-378. doi:10.1145/3178876.3186103

Examples

net_by_polarisation(ison_lawfirm, "age")
#> # Polarisation [0, Inf)
#> [1] 104
net_by_disagreement(ison_lawfirm, "age")
#> # Disagreement [0, Inf)
#> [1] 159