View source: R/twomode_homophilous4Cycles.R
computeHomFourCycles | R Documentation |
This function computes the number of homophilous four-cycles in a two-mode network as proposed by Fujimoto, Snijders, and Valente (2018: 380). See Fujimoto, Snijders, and Valente (2018) for more details about this measure.
computeHomFourCycles(net, mem)
net |
The two-mode adjacency matrix. |
mem |
The vector of membership values that the homophilous four-cycles will be based on. |
Following Fujimoto, Snijders, and Valente (2018: 380), the number of homophilous four-cycles for actor i is:
\sum_{j} \sum_{a\neq b} y_{ia}y_{ib}y_{ja}y_{jb}I{{v_{i} = v_{j}}}
where y is the two-mode adjacency matrix, v is the vector of
membership scores (e.g., sports/club membership), a and b represent
the level two groups, and I{v_i = v_j}
is the indicator function that
is 1 if the values are the same and 0 if not.
The vector of counts of homophilous four-cycles for the two-mode network.
Kevin A. Carson kacarson@arizona.edu, Diego F. Leal dflc@arizona.edu
Fujimoto, Kayo, Tom A.B. Snijders, and Thomas W. Valente. 2018. "Multivariate dynamics of one-mode and two-mode networks: Explaining similarity in sports participation among friends." Network Science 6(3): 370-395.
# For this example, we use the Davis Southern Women's Dataset.
data("southern.women")
#creating a random binary membership vector
set.seed(9999)
membership <- sample(0:1, nrow(southern.women), replace = TRUE)
#the homophilous four-cycle values
computeHomFourCycles(southern.women, mem = membership)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.