weighted_richclub_w {tnet} | R Documentation |
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/
Note that when specifying rich="s", you should also specify reshuffle="weights.local" as this method maintains the out-strength of nodes.
weighted_richclub_w(net, rich="k", reshuffle="weights", samples=100, seed=NULL, directed=NULL)
net |
A weighted edgelist |
rich |
specifies the richness parameter, either "k" or "s". |
reshuffle |
specifies the reshuffling procedure used, either "weights" or "links". |
samples |
number of random networks used. |
seed |
the random generators seed, used to produce random yet reproducable results. |
directed |
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.
version 1.0.0
Tore Opsahl; http://toreopsahl.com
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/
## Load 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")