structural_equivalence: Structural equivalence

View source: R/structural_equivalence.R

structural_equivalenceR Documentation

Structural equivalence

Description

Calculate structural equivalence

Usage

structural_equivalence(g, weight = NULL, digits = 3, suppressWarnings = TRUE)

Arguments

g

graph of class igraph

weight

Either NULL (the default) or a character string giving an edge attribute name. If the graph has multiple edges, the edge attribute of an arbitrarily chosen edge (for the multiple edges) is included. Note that the function requires the attribute to be either logical or numeric.

digits

number of decimals to use

suppressWarnings

logical, whether or not any warnings should be returned

Details

Calculate structural equivalence based on correlations. The function, of course, disregards the diagonal.

Vertices are also perfectly structurally equivalent with themselves.

If requested, an edge attribute can be taken into account through the weight argument. By default, no weights are used.

The value varies between [-1, 1], with -1 denoting maximally possible distance between two vertices and +1 denoting exact structural equivalence.

Value

matrix of size n*n, with n equal to the number of vertices in the graph

Examples

data("Jemaah_Islamiyah", package = "DF21")
structural_equivalence(Jemaah_Islamiyah)
structural_equivalence(Jemaah_Islamiyah, weight = "weight")

SNAnalyst/DF21 documentation built on March 21, 2022, 12:02 a.m.