
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/
weighted_richclub_w(net, rich="k", reshuffle="weights", NR=1000,
nbins=30, seed=NULL, directed=NULL)
A weighted edgelist
specifies the richness parameter, either "k" or "s".
specifies the reshuffling procedure used, either "weights" or "links".
number of random networks used.
the number of bins in the output
the random generators seed, used to produce random yet reproducable results.
logical parameter: whether the network is directed or undirected.
Returns a table with the fraction of phi(observed) over phi(null) for each k or s in the dataset.
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/
# NOT RUN {
## Load sample data
sample <- cbind(
i=c(1,1,2,2,2,2,3,3,4,5),
j=c(2,3,1,3,4,5,1,2,2,2),
w=c(4,2,4,4,1,2,2,4,1,2))
## Run the function
weighted_richclub_w(sample, rich="k", reshuffle="weights", NR = 100)
# }
Run the code above in your browser using DataLab