|
This function calculates the weighted rich-club coefficient proposed in Opsahl, T., Colizza, V., Panzarasa, P., Ramasco, J.J. "Prominence and control: The weighted rich-club effect". Physical Review Letters 101 (168702; arXiv: 0804.0417). It takes five parameters: - net: the edgelist of a weighted one-mode network
- rich: "k", "s"; default "k"
- reshuffle: "weights" or "links"; default: "weights"
- NR: number of reshuffles; default: 100
- nbins: number of bins in the output
- seed: random seed
- directed: whether the network is directed; default=NULL which means that it is detected
Example ## Load tnet library(tnet) ## Define sample data
sampledata <- 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)) ## Run the function weighted_richclub_w(sampledata, rich="k", reshuffle="weights")
x y l99 l95 h95 h99 1 0.999990 1.000000 1.0000000 1.0000000 1.000000 1.000000 2 1.024179 1.286449 0.6432247 0.6432247 1.286449 1.286449 ... 30 1.999990 1.286449 0.6432247 0.6432247 1.286449 1.286449
|