ei_index | R Documentation |
This index was proposed by Krackhardt and Stern (1988) to distinguish between the relative prevalence of between and within-group ties. This measure can be interpreted as homophily at the network level.
ei_index(A, mixed = TRUE, att = NULL)
A |
A symmetric matrix object |
mixed |
Whether the matrix provided is already a mixed matrix or not |
att |
Categorical attribute of the nodes |
Numerical value of the E-I index.
set.seed(18051889)
n <- 100
A <- matrix(c(rbinom(n, 1, 0.5)),
ncol = sqrt(n), nrow = sqrt(n), byrow = TRUE
)
rownames(A) <- letters[1:nrow(A)]
colnames(A) <- letters[1:ncol(A)]
att <- rbinom(sqrt(n), 3, 0.5)
ei_index(A, mixed = FALSE, att = att)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.