These functions measure where and how fast the opinions in a network settle, when each node repeatedly takes a weighted mean of the opinions of the nodes it listens to, as manynet::play_opinion() does with rule = "degroot":

  • node_by_opinion() measures the opinion that each node ends with.

  • net_by_convergence() measures the speed at which the opinions settle.

See node_by_influence() and net_by_influence() for how much the first opinion of each node shapes the opinions at the end.

Each takes the influence matrix \(W\) from manynet::to_influence(), so a tie from \(i\) to \(j\) means that \(i\) listens to \(j\). Where the network has a nodal attribute named "stubbornness", each node holds on to its first opinion by that share, from 0 to 1, as in manynet::play_opinion(). Without it, no node is stubborn, which is DeGroot's model.

node_by_opinion(.data, attribute = "opinions")

net_by_convergence(.data)

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

The name of a numeric nodal attribute that holds the first opinions. By default "opinions", as in manynet::play_opinion().

Value

A node_measure numeric vector the length of the nodes in the network, providing the scores for each node. If the network is labelled, then the scores will be labelled with the 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().

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

Opinions at the end

With \(S\) the diagonal matrix of stubbornness, the opinions move as $$x(t+1) = (I - S) W x(t) + S x(0)$$ With some stubbornness this settles at the equilibrium of Friedkin and Johnsen (1990), $$x(\infty) = (I - (I - S) W)^{-1} S x(0)$$ Without stubbornness, every node in a connected network reaches one consensus: the mean of the first opinions, weighted by node_by_influence(). The result is found from the limit of the matrix powers, so it also holds where some nodes are stubborn and others are not. Where the opinions do not settle, for example on a path with no stubbornness, where they swing back and forth for ever, a warning says so and the result is the mean of the opinions they swing between.

Convergence

net_by_convergence() is \(1 - |\lambda|\), where \(|\lambda|\) is the largest modulus among the eigenvalues of \((I - S) W\) other than those equal to 1. This is the share of the distance to the opinions at the end that is closed at each step, in the long run. A value of 1 settles in one step, and a value of 0 never settles. It is about opinions and not about the convergence of an estimation.

References

On opinion dynamics

DeGroot, Morris H. 1974. "Reaching a consensus". Journal of the American Statistical Association 69(345): 118-121. doi:10.1080/01621459.1974.10480137

Friedkin, Noah E., and Eugene C. Johnsen. 1990. "Social influence and opinions". Journal of Mathematical Sociology 15(3-4): 193-206. doi:10.1080/0022250X.1990.9990069

Golub, Benjamin, and Matthew O. Jackson. 2010. "Naive learning in social networks and the wisdom of crowds". American Economic Journal: Microeconomics 2(1): 112-149. doi:10.1257/mic.2.1.112

Examples

path <- manynet::add_node_attribute(manynet::create_explicit(A-B-C),
                                    "opinions", c(0, 0.5, 1))
node_by_opinion(manynet::add_node_attribute(path, "stubbornness", rep(0.5, 3)))
#> # Opinion at the end [0, 1]
#> ▃▃▃ 
#>       A     B     C
#> 1  0.25   0.5  0.75
net_by_convergence(manynet::create_ring(6))
#> # Opinion convergence, normalized [0, 1]
#> [1] 1.11e-16
net_by_convergence(manynet::create_filled(6))
#> # Opinion convergence, normalized [0, 1]
#> [1] 0.8