Learn R Programming

tnet (version 3.0.1)

weighted_richclub_w: The weighted rich-club effect

Description

This function calculates the weighted rich-club coefficient proposed in Opsahl, T., Colizza, V., Panzarasa, P., Ramasco, J.J., 2008. Prominence and control: The weighted rich-club effect. PRL 101. http://toreopsahl.com/2008/12/12/article-prominence-and-control-the-weighted-rich-club-effect/

Usage

weighted_richclub_w(net, rich="k", reshuffle="weights", NR=1000, nbins=30, seed=NULL, directed=NULL)

Arguments

net
A weighted edgelist
rich
specifies the richness parameter, either "k" or "s".
reshuffle
specifies the reshuffling procedure used, either "weights" or "links".
NR
number of random networks used.
nbins
the number of bins in the output
seed
the random generators seed, used to produce random yet reproducable results.
directed
logical parameter: whether the network is directed or undirected.

Value

  • Returns a table with the fraction of phi(observed) over phi(null) for each k or s in the dataset.

References

Opsahl et al., 2008. Prominence and control: The weighted rich-club effect. PRL 101 http://toreopsahl.com/2008/12/12/article-prominence-and-control-the-weighted-rich-club-effect/

Examples

Run this code
## Load sample data
sample <- cbind(
i=c(1,1,2,2,2,2,3,3,4,5,5,6),
j=c(2,3,1,3,4,5,1,2,2,2,6,5),
w=c(4,2,4,4,1,2,2,4,1,2,1,1))

## Run the function
weighted_richclub_w(sample, rich="k", reshuffle="weights")

Run the code above in your browser using DataLab