View source: R/network-summary.R
| network_small_world | R Documentation |
Computes the small-world coefficient
\sigma = \frac{C / C_{rand}}{L / L_{rand}}
where C is the global clustering coefficient, L is the mean
shortest path length, and C_{rand} and L_{rand} are their means
over Erdos-Renyi graphs with the same numbers of nodes and edges. A
directed network is collapsed to undirected first.
network_small_world(x, n_random = 10, ...)
x |
Network input: matrix, igraph, network, cograph_network, or tna object |
n_random |
Number of Erdos-Renyi comparison graphs (same |
... |
Passed to |
Values above 1 indicate small-world structure.
Numeric: small-world coefficient sigma. NA when the graph has
fewer than 4 nodes, no edges, or an undefined/zero mean path length.
The comparison graphs are drawn from the caller's RNG stream; this function
takes no seed argument and does not save or restore
.Random.seed. Call set.seed() beforehand for a reproducible
result. A larger n_random gives a more stable estimate.
Humphries, M. D., & Gurney, K. (2008). Network 'small-world-ness': A quantitative method for determining canonical network equivalence. PLoS ONE, 3(4), e0002002. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pone.0002002")}
Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of 'small-world' networks. Nature, 393(6684), 440–442. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1038/30918")}
set.seed(1)
network_small_world(regulation_net, n_random = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.