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, defined as: sigma = (C / C_rand) / (L / L_rand) where C is clustering coefficient, L is mean path length, and _rand are values from equivalent random graphs.

Usage

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

Arguments

x

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

n_random

Number of random graphs for comparison. Default 10.

...

Additional arguments passed to to_igraph

Details

Values > 1 indicate small-world properties. Typically small-world networks have sigma >> 1.

Value

Numeric: small-world coefficient sigma

Examples

# Watts-Strogatz small-world graph
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::sample_smallworld(1, 20, 3, 0.1)
  network_small_world(g)  # Should be > 1
}

cograph documentation built on April 1, 2026, 1:07 a.m.