Learn R Programming

NetworkToolbox (version 1.4.2)

smallworldness: Small-worldness Measure

Description

Computes the small-worldness measure of a network

Usage

smallworldness(
  A,
  iter = 100,
  progBar = FALSE,
  method = c("HG", "rand", "TJHBL")
)

Arguments

A

An adjacency matrix of network data

iter

Number of random (or lattice) networks to generate, which are used to calculate the mean random ASPL and CC (or lattice)

progBar

Defaults to FALSE. Set to TRUE to see progress bar

method

Defaults to "HG" (Humphries & Gurney, 2008). Set to "rand" for the CC to be calculated using a random network or set to "TJHBL" for (Telesford et al., 2011) where CC is calculated from a lattice network

Value

Returns a list containing:

swm

Small-worldness value

rASPL

Global average shortest path length from random network

lrCCt

When "rand", clustering coefficient from a random network. When "HG", transitivity from a random network. When "TJHBL", clustering coefficient from a lattice network

Details

For "rand", values > 1 indicate a small-world network. For "HG", values > 3 indicate a small-world network. For "TJHBL", values near 0 indicate a small-world network, while < 0 indicates a more regular network and > 0 indicates a more random network

References

Humphries, M. D., & Gurney, K. (2008). Network 'small-world-ness': A quantitative method for determining canonical network equivalence. PLoS one, 3, e0002051.

Telesford, Q. K., Joyce, K. E., Hayasaka, S., Burdette, J. H., & Laurienti, P. J. (2011). The ubiquity of small-world networks. Brain Connectivity, 1(5), 367-375.

Examples

Run this code
# NOT RUN {
# Pearson's correlation only for CRAN checks
A <- TMFG(neoOpen, normal = FALSE)$A

# }
# NOT RUN {
swmHG <- smallworldness(A, method="HG")

swmRand <- smallworldness(A, method="rand")

swmTJHBL <- smallworldness(A, method="TJHBL")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab