View source: R/twomode_Redunancy.R
computeBCRedund | R Documentation |
This function calculates the values for two mode redundancy for weighted and unweighted two-mode networks based on Burchard and Cornwell (2018).
computeBCRedund(
net,
inParallel = FALSE,
nCores = NULL,
isolates = NA,
weighted = FALSE
)
net |
A two-mode adjacency matrix or affiliation matrix. |
inParallel |
TRUE/FALSE. TRUE indicates that parallel processing will be used to compute the statistic with the foreach package. FALSE indicates that parallel processing will not be used. Set to FALSE by default. |
nCores |
If inParallel = TRUE, the number of computing cores for parallel processing. If this value is not specified, then the function internally provides it by dividing the number of available cores in half. |
isolates |
What value should isolates be given? Preset to be NA. |
weighted |
TRUE/FALSE. TRUE indicates the statistic will be based on the weighted formula (see the details section). FALSE indicates the statistic will be based on the original non-weighted formula. Set to FALSE by default. |
The formula for two-mode redundancy is:
r_{ij} = \frac{|\sigma(j) \cap \sigma(i)|}{|\sigma(i)|}
where:
r_{ij}
is the redundancy of ego i with respect to actor j.
|\sigma(j) \cap \sigma(i)|
is the number of same-class contacts (e.g., medical doctors in a hospital) that i and j both share.
|\sigma(i)|
is the number of same-class contacts of ego i.
The two-mode redundancy is ego-bound, that is, the redundancy is only based on the
two-mode ego network of i. Put differently, r_{ij}
only considers the perspective of the ego.
This function allows the user to compute the scores in parallel through the foreach and doParallel R packages.
If the matrix is weighted, the user should specify weighted = TRUE. Following Burchard and Cornwell (2018),
the formula for two-mode weighted redundancy is:
r_{ij} = \frac{|\sigma(j) \cap \sigma(i)|}{|\sigma(i)| \times w_t}
where w_t
is the average of the tie weights that i and j send
to their shared opposite class contacts.
An n x n matrix with level 1 redundancy scores for actors in a two-mode network.
Kevin A. Carson kacarson@arizona.edu, Diego F. Leal dflc@arizona.edu
Burchard, Jake and Benjamin Cornwell. 2018. "Structural Holes and bridging in two-mode networks." Social Networks 55:11-20.
# For this example, we recreate Figure 2 in Burchard and Cornwell (2018: 13)
BCNet <- matrix(
c(1,1,0,0,
1,0,1,0,
1,0,0,1,
0,1,1,1),
nrow = 4, ncol = 4, byrow = TRUE)
colnames(BCNet) <- c("1", "2", "3", "4")
rownames(BCNet) <- c("i", "j", "k", "m")
#library(sna) #To plot the two mode network, we use the sna R package
#gplot(BCNet, usearrows = FALSE,
# gmode = "twomode", displaylabels = TRUE)
#this values replicate those reported by Burchard and Cornwell (2018: 14)
computeBCRedund(BCNet)
#For this example, we recreate Figure 9 in Burchard and Cornwell (2018:18)
#for weighted two mode networks.
BCweighted <- matrix(c(1,2,1, 1,0,0,
0,2,1,0,0,1),
nrow = 4, ncol = 3,
byrow = TRUE)
rownames(BCweighted) <- c("i", "j", "k", "l")
computeBCRedund(BCweighted, weighted = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.