network_small_world: Small-World Coefficient (Sigma)

View source: R/network-summary.R

network_small_worldR Documentation

Small-World Coefficient (Sigma)

Description

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.

Usage

network_small_world(x, n_random = 10, ...)

Arguments

x

Network input: matrix, igraph, network, cograph_network, or tna object

n_random

Number of Erdos-Renyi comparison graphs (same n and m as the observed graph). Default 10.

...

Passed to to_igraph, whose only other argument is directed; anything else raises an "unused argument" error.

Details

Values above 1 indicate small-world structure.

Value

Numeric: small-world coefficient sigma. NA when the graph has fewer than 4 nodes, no edges, or an undefined/zero mean path length.

Reproducibility

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.

References

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")}

Examples


set.seed(1)
network_small_world(regulation_net, n_random = 5)


cograph documentation built on Nov. 19, 2026, 5:07 p.m.