smallworldness: Calculate small-worldness of network

Description Usage Arguments References Examples

View source: R/smallworldness.R

Description

This function calculate the small-worldness of a given weighted or unweighted network using Humphries or Telesford method.

Usage

1
2
smallworldness(adjacency, definition = "Humphries", option = "gconly",
  measure = "am", reshuffle = "weights")

Arguments

adjacency

The input adjacency matrix of a network.

definition

The definition of small-worldness.

"Humphries" implies the definition provided by Humphries (2008).

"Telesford" implies the definition provided by Telesford (2010).

option

The option of treating the infinite path length in the network.

"gconly" implies calculating the path length only for the gaint component (default).

"max" implies treating the infinite path length as the maximum non-infinite length in the network.

"2max" implies treating the infinite path length as the twice of the maximum non-infinite length in the network.

NULL implies leaving the infinite path length as it is.

measure

The method used to measure the value of triplet in the network.

"am" implies the arithmetic mean method (default).

"gm" implies the geometric mean method.

"mi" implies the minimum method.

"ma" implies the maximum method.

"bi" implies the binary measure.

reshuffle

The option the way to reshuffled edges in the network. "weights" implies randomly assigning the weights to the edges.

"links" implies maintaining the degree distribution, but changing the contacts randomly.

References

Humphries MD, Gurney K (2008). Network <e2><80><98>Small-World-Ness<e2><80><99>: A Quantitative Method for Determining Canonical Network Equivalence. PLoS ONE 3(4): 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
edg <- rbind(
c(1,2,4),
c(1,3,2),
c(2,1,4),
c(2,3,4),
c(2,4,1),
c(2,5,2),
c(3,1,2),
c(3,2,4),
c(4,2,1),
c(5,2,2),
c(5,6,1),
c(6,5,1))
adj <- edgelist.to.adjacency(edg)
smallworldness(adj)

hangxiong/wNetwork documentation built on May 17, 2019, 2:28 p.m.