trans_matrix: Transitivity matrix

View source: R/structure.R

trans_matrixR Documentation

Transitivity matrix

Description

This function assigns a one in the elements of the matrix if a group of actors are part of a transitivity structure (030T label considering the MAN triad census)

Usage

trans_matrix(A, loops = FALSE)

Arguments

A

A matrix

loops

Whether to expect nonzero elements in the diagonal of the matrix

Value

A vector assigning an id the components that each of the nodes of the matrix belongs

Author(s)

Alejandro Espinosa-Rada

References

Davis, J.A. and Leinhardt, S. (1972). “The Structure of Positive Interpersonal Relations in Small Groups.” In J. Berger (Ed.), Sociological Theories in Progress, Vol. 2, 218-251. Boston: Houghton Mifflin.

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

Examples


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


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