trans_coef: Transitivity

View source: R/structure.R

trans_coefR Documentation

Transitivity

Description

This measure is sometimes called clustering coefficient.

Usage

trans_coef(
  A,
  method = c("weakcensus", "global", "mean", "local"),
  select = c("all", "in", "out")
)

Arguments

A

A matrix

method

Whether to calculate the weakcensus, global transitivity ratio, the mean transitivity or the local transitivity.

select

Whether to consider all, in or out ties for the local transitivity.

Value

Return a transitivity measure

Author(s)

Alejandro Espinosa-Rada

References

Wasserman, S. and Faust, K. (1994). Social network analysis: Methods and applications. Cambridge University Press.

Examples


A <- matrix(c(
  0, 1, 0, 1, 0,
  1, 0, 1, 1, 0,
  0, 1, 0, 0, 0,
  1, 1, 0, 0, 1,
  0, 0, 0, 1, 0
), byrow = TRUE, ncol = 5)
rownames(A) <- letters[1:ncol(A)]
colnames(A) <- rownames(A)

trans_coef(A, method = "local")

anespinosa/netmem documentation built on April 5, 2025, 5:02 p.m.