Per-pair measure of tie strength from the Facebook relationship-inference paper. For each pair \((u, v)\) where \(v\) is a neighbor of \(u\):
dispersion(x, u = NULL, v = NULL, normalized = TRUE, alpha = 1, b = 0, c = 0)Scalar if both u and v are specified.
Named numeric vector if exactly one of u, v is given,
one element per neighbor of that node; the names are the neighbors'
1-based node indices as character strings, not their labels.
A data frame with columns from, to, dispersion
when neither u nor v is given, one row per ordered
(node, neighbor) pair, with from and to given as 1-based
integer node indices.
numeric(0) for an empty graph.
Network input (matrix, igraph, network, cograph_network, tna object).
Optional source node (1-based index or node name). If NULL
(default), compute for all sources.
Optional target node. If NULL, compute for all neighbors
of u.
Logical. If TRUE (default), return the normalized
form; otherwise the raw count.
Numeric normalization exponent. Default 1.
Numeric bias added to dispersion before exponentiation. Default 0.
Numeric bias added to embeddedness in the denominator. Default 0.
Let \(S_T = N(u) \cap N(v)\) be their mutual friends (embeddedness).
Count pairs \((s, t) \subset S_T\) such that:
\(s\) and \(t\) are not directly connected, AND
\(s\) and \(t\) share no common neighbor inside \(N(u)\) other than \(u\) and \(v\).
The raw dispersion is this count. When normalized = TRUE,
the result is \((\mathrm{dispersion} + b)^{\alpha} /
(\mathrm{embeddedness} + c)\) (normalization is skipped when
embeddedness + c == 0).
Matches networkx.dispersion bit-exact for all three call modes
(single pair, single source, full matrix).
Backstrom, L., & Kleinberg, J. (2014). Romantic partnerships and the dispersion of social ties: A network analysis of relationship status on Facebook. In Proceedings of CSCW (pp. 831-841). ACM. https://arxiv.org/pdf/1310.6753v1.pdf
g <- igraph::make_graph("Zachary")
# Node 0 (R index 1) to node 33 (R index 34)
dispersion(g, u = 1, v = 34)
# All pairs from node 1
head(dispersion(g, u = 1))
Run the code above in your browser using DataLab