Centrality in Two-Mode Networks

We have already seen how to calculate the simplest measure of centrality in two-mode networks (degree) in the basic two-mode statistics lecture. Here we extend the discussion to the other two of the big three, closeness and betwennness. As always, we load up the usual Southern Women (SW) data:

    library(igraph)
    library(networkdata)
    g <- southern_women
    A <- as_biadjacency_matrix(g)

Geodesic Distances

Geodesic distances work a bit different in two-mode networks because of the only between-node-sets edges restriction.

For instance, the minimum geodesic distance \(g_{ii'}\) between two people is two (a person cannot be adjacent to another person), but it is one between a person and a group (if the person is a member of the group).

In the same way, a group \(g\) cannot be at geodesic distance less than three from a person \(p*\) who is not a member, because the shortest path is \(g-p-g^*-p^*\).

That is, there has to be some other group \(g^*\) shared between a member \(p\) of the focal group \(g\) and another person \(p^*\) for the shortest path between \(g\) and the non-member \(p^*\) to exist, and that involves three links at minimum: \(g-p\), \(p-g^*\), and \(g^*-p^*\). This means that the links in paths in two-mode networks always alternate between persons and group nodes.

Beyond that geodesic distances work the same way. In igraph when we use the distances function on a bipartite graph, we get:

   D.pg <- distances(g)
   head(D.pg)
          EVELYN LAURA THERESA BRENDA CHARLOTTE FRANCES ELEANOR PEARL RUTH
EVELYN         0     2       2      2         2       2       2     2    2
LAURA          2     0       2      2         2       2       2     2    2
THERESA        2     2       0      2         2       2       2     2    2
BRENDA         2     2       2      0         2       2       2     2    2
CHARLOTTE      2     2       2      2         0       2       2     4    2
FRANCES        2     2       2      2         2       0       2     2    2
          VERNE MYRNA KATHERINE SYLVIA NORA HELEN DOROTHY OLIVIA FLORA 6/27 3/2
EVELYN        2     2         2      2    2     2       2      2     2    1   1
LAURA         2     2         2      2    2     2       2      4     4    1   1
THERESA       2     2         2      2    2     2       2      2     2    3   1
BRENDA        2     2         2      2    2     2       2      4     4    1   3
CHARLOTTE     2     4         4      2    2     2       4      4     4    3   3
FRANCES       2     2         2      2    2     2       2      4     4    3   3
          4/12 9/26 2/25 5/19 3/15 9/16 4/8 6/10 2/23 4/7 11/21 8/3
EVELYN       1    1    1    1    3    1   1    3    3   3     3   3
LAURA        1    3    1    1    1    1   3    3    3   3     3   3
THERESA      1    1    1    1    1    1   1    3    3   3     3   3
BRENDA       1    1    1    1    1    1   3    3    3   3     3   3
CHARLOTTE    1    1    1    3    1    3   3    3    3   3     3   3
FRANCES      1    3    1    1    3    1   3    3    3   3     3   3
   tail(D.pg)
      EVELYN LAURA THERESA BRENDA CHARLOTTE FRANCES ELEANOR PEARL RUTH VERNE
4/8        1     3       1      3         3       3       3     1    1     1
6/10       3     3       3      3         3       3       3     3    3     3
2/23       3     3       3      3         3       3       3     3    3     3
4/7        3     3       3      3         3       3       3     3    3     1
11/21      3     3       3      3         3       3       3     3    3     3
8/3        3     3       3      3         3       3       3     3    3     3
      MYRNA KATHERINE SYLVIA NORA HELEN DOROTHY OLIVIA FLORA 6/27 3/2 4/12 9/26
4/8       1         1      1    1     3       1      1     1    2   2    2    2
6/10      1         1      1    1     1       3      3     3    4   4    4    4
2/23      3         3      3    1     1       3      1     1    4   4    4    4
4/7       1         1      1    1     1       3      3     3    4   4    4    4
11/21     3         1      1    1     3       3      3     3    4   4    4    4
8/3       3         1      1    1     3       3      3     3    4   4    4    4
      2/25 5/19 3/15 9/16 4/8 6/10 2/23 4/7 11/21 8/3
4/8      2    2    2    2   0    2    2   2     2   2
6/10     4    2    2    2   2    0    2   2     2   2
2/23     4    2    2    2   2    2    0   2     2   2
4/7      4    2    2    2   2    2    2   0     2   2
11/21    4    2    2    2   2    2    2   2     0   2
8/3      4    2    2    2   2    2    2   2     2   0

Which is a square matrix of dimensions \((M + N) \times (M + N)\); that’s \((18 + 14) \times (18 + 14) = 32 \times 32\) in our case.

We can check in R:

   dim(D.pg)
[1] 32 32

As we can see in the distance matrix, distances between nodes in the same set are even \(g_{ii'|jj'} = \{2, 4, \ldots\}\) but distances in nodes in different sets are odd \(g_{ij|ji} = \{1, 3, \ldots\}\). Beyond this hiccup, distances can be interpreted in the same way as one-mode networks.

Closeness Centrality

This means that (unnormalized) closeness centrality works the same way as it does in regular networks:

   round(closeness(g), 3)
   EVELYN     LAURA   THERESA    BRENDA CHARLOTTE   FRANCES   ELEANOR     PEARL 
    0.017     0.015     0.017     0.015     0.013     0.014     0.014     0.014 
     RUTH     VERNE     MYRNA KATHERINE    SYLVIA      NORA     HELEN   DOROTHY 
    0.015     0.015     0.014     0.015     0.016     0.017     0.015     0.014 
   OLIVIA     FLORA      6/27       3/2      4/12      9/26      2/25      5/19 
    0.012     0.012     0.012     0.012     0.013     0.012     0.014     0.016 
     3/15      9/16       4/8      6/10      2/23       4/7     11/21       8/3 
    0.017     0.019     0.018     0.013     0.012     0.013     0.012     0.012 

Which is just the inverse of the sums of the distances matrix for people and groups counting their geodesic distances to nodes of both sets.

However, as Borgatti and Everett (1997) note, if we want normalized closeness centralities, we can’t use the off-the-shelf normalization for one-mode networks in igraph (\(n-1\)) as it will give us non-sense results because now we have two sets of nodes.

Instead, we need to normalize the closeness score for each node set by its theoretical maximum for each node set.

For people, this is:

\[ N + 2(M - 1) \]

And for groups/events this same quantity is:

\[ M + 2(N - 1) \]

The basic idea is that nodes can be at minimum geodesic distance \(g = 1\) from nodes of the other set (for people, groups; for groups, people) and at minimum distance \(g = 2\) from nodes of their own set, with their own presence eliminated by subtraction (Borgatti and Everett 1997).

In our case, we create a normalization vector with these quantities of length \(M + N\):

   M <- nrow(A)
   N <- ncol(A)
   n.p <- N + 2 * (M - 1)
   n.e <- M + 2 * (N - 1)
   norm.vec <- c(rep(n.p, M), rep(n.e, N))

And normalized closeness is:

   round(norm.vec/rowSums(D.pg), 3)
   EVELYN     LAURA   THERESA    BRENDA CHARLOTTE   FRANCES   ELEANOR     PEARL 
    0.800     0.727     0.800     0.727     0.600     0.667     0.667     0.667 
     RUTH     VERNE     MYRNA KATHERINE    SYLVIA      NORA     HELEN   DOROTHY 
    0.706     0.706     0.686     0.727     0.774     0.800     0.727     0.649 
   OLIVIA     FLORA      6/27       3/2      4/12      9/26      2/25      5/19 
    0.585     0.585     0.524     0.524     0.564     0.537     0.595     0.688 
     3/15      9/16       4/8      6/10      2/23       4/7     11/21       8/3 
    0.733     0.846     0.786     0.550     0.537     0.564     0.524     0.524 

Which are the same numbers in Borgatti and Everett (1997, table 1, column 6).

Betweenness Centrality

As Borgatti and Everett (1997) also note, the normalizations for betweenness centrality in the two-mode case are a bit more involved. This is because they depend on which node set is larger than the other.

For the larger node set, which in our case is the people, the normalization is:

\[ 2(M-1)(N-1) \]

For the smaller node set, which in our case is the groups/events, the normalization is:

\[ \frac{1}{2}(N)(N-1)+\frac{1}{2}(M-1)(M-2)+(M-1)(N-1) \]

Remember that you have to switch this around if you are analyzing a network with more groups than people.

Creating the relevant vectors:

   n.p <- 2*(M-1)*(N-1)
   n.e <- (1/2)*(N*(N-1))+(1/2)*(M-1)*(M-2)+(M-1)*(N-1)
   norm.vec <- c(rep(n.p, M), rep(n.e, N))

And normalized betweenness is:

   round(betweenness(g)/norm.vec, 4)*100
   EVELYN     LAURA   THERESA    BRENDA CHARLOTTE   FRANCES   ELEANOR     PEARL 
     9.72      5.17      8.82      4.98      1.07      1.08      0.95      0.68 
     RUTH     VERNE     MYRNA KATHERINE    SYLVIA      NORA     HELEN   DOROTHY 
     1.69      1.58      1.65      4.77      7.22     11.42      4.27      0.20 
   OLIVIA     FLORA      6/27       3/2      4/12      9/26      2/25      5/19 
     0.51      0.51      0.22      0.21      1.84      0.78      3.80      6.56 
     3/15      9/16       4/8      6/10      2/23       4/7     11/21       8/3 
    13.07     24.60     22.75      1.15      1.98      1.83      0.23      0.23 

Which are (with some slight differences and rounding errors) the same numbers in Borgatti and Everett (1997, table 2, column 3).

References

Borgatti, Stephen P, and Martin G Everett. 1997. “Network Analysis of 2-Mode Data.” Social Networks 19 (3): 243–69.