Learn R Programming

tnet (version 2.6)

clustering_w: Generalised clusering coefficient

Description

This function calculates the generalised clusering coefficient as proposed by Opsahl, T., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks 31 (2), 155-163, doi: 10.1016/j.socnet.2009.02.002

Usage

clustering_w(net, measure = "mi", subsample=1, seed=NULL)

Arguments

net
A weighted edgelist
measure
The measure-switch control the method used to calculate the value of the triplets. am implies the arithmetic mean method gm implies the geometric mean method mi implies the minimum method ma implies the maximum method bi implies the binary measure This ca
subsample
Whether a only a subset of triplets should we used when calculating the measure. This is particularly useful when running out of memory analysing large networks. If it is set to 1, all the triplets are analysed. If it set to a value below one, this is rou
seed
If a subset of triplets is analysed, by setting this parameter, the results are reproducable.

Value

  • Returns the outcome of the equation presented in the paper for the method specific (measure)

References

Opsahl, T., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks 31 (2), 155-163, doi: 10.1016/j.socnet.2009.02.002 http://toreopsahl.com/2009/04/03/article-clustering-in-weighted-networks/

Examples

Run this code
## Generate a random graph
#density: 300/(100*99)=0.03030303; 
#this should be average from random samples
rg <- rg_w(nodes=100,arcs=300,max.weight=10)

## Run clustering function
clustering_w(rg)

Run the code above in your browser using DataLab