Learn R Programming

memnet (version 0.1.0)

alc: Average local clustering (alc) coefficient

Description

Computes the uncorrected or corrected average local clustering coffiecient.

Usage

alc(adj, types = "uncorrected", weights = NULL, mode = "undirected")

Arguments

adj

numeric matrix representing the adjacency matrix.

types

character. Either "uncorrected" or "corrected", or a vector containing both.

weights

numeric vector of edge weights. Optional.

mode

character, either "directed" or "undirected", specifying whether the network should be interepeted as directed or undirected. Defaults to "undirected".

Value

the corrected local clustering coefficient and/or the uncorrected clustering coefficient.

Details

The uncorrected clustering coefficent is computed according to Watts & Strogatz (1998). The corrected clustering coefficient normalizes the uncorrected one by the average degree / n nodes, i.e., the expected average local clustering for an Erd<U+00F6>s-Renyi random graph.

Examples

Run this code
# NOT RUN {
# get fluency data
data(animal_fluency)

# edge lists of fluency graphs
edge_list = threshold_graph(animal_fluency)

# get adjacency matrices
adj = edg_to_adj(edge_list)

# get local average clustering coefficient
alc(adj)

# get corrected local average clustering coefficient
alc(adj, types = 'corrected')

# }

Run the code above in your browser using DataLab