## Node Centrality in Two-mode Networks

The centrality of nodes, or the identification of which nodes are more “central” than others, has been a key issue in network analysis (Freeman, 1978). Freeman (1978) argued that central nodes were those “in the thick of things” or focal points. Based on this concept, he formalised three measures: degree, closeness, and betweenness. For a more complete background on these measures, see Node Centrality in Weighted Networks.

**Degree**

Degree is the number of ties a node has or the number other nodes that a node is connected to. In two-mode networks, this concept can be directly applied. Nevertheless, there is a slight complications. In two-mode networks, “the number of other nodes that a node is connected to” is ambiguous. It could either be the number of secondary nodes a primary node is connected to (and vice versa), or the number of primary nodes a primary node is connected to. To clarify the difference between these two numbers, I referred to them as nodes’ two-mode and one-mode degree, respectively. To exemplify the difference, the image below shows the local network surrounding Flora in the Davis’ (1940) Southern Women Dataset (adapted from Opsahl, 2011).

As can be seen from this diagram, Flora’s two-mode degree is 2 and the one-mode degree is 12. If the network was projected to a one-mode network, the standard degree measure would be 12.

It is also possible to get at nodes’ two-mode degree after a network has been projected using Newman’s (2001) method. This projection method was developed for scientific co-authorship networks, and sets the tie weight between two authors equal to the sum across co-authored papers of 1 over number of authors on that paper minus 1. In other words, for each co-authored paper, a node divides 1 by the other authors. As such, the total tie weight is equal to the number of co-authored papers. The only difference between this method and the two-mode degree is single authored papers. These are excluded in the first and included in the second method.

**Closeness and Betweenness**

The main part of the closeness and betweenness measures is shortest paths and their length. Closeness is the inverse sum of the shortest paths’ lengths, and betweenness is the number of shortest paths that pass through a node. By taking advantage of the two-mode shortest path algorithm, it is possible easily extend these two measures to two-mode networks. To quickly recap this algorithm:

- Use an appropriate projection method
- Use the method for identifying the shortest paths, and calculating their length, in weighted one-mode networks (Brandes, 2001; Dijkstra, 1959; Newman, 2001)

When the length of the shortest paths are found, the closeness measure would simply be the inverse sum of them. Similarly, betweenness would easily be calculate by looking at the intermediary nodes on the shortest paths, and count, for each node, the number of times that node is an intermediary. Note: if there are multiple shortest paths, it is important to divide by the number of them to ensure that each path only counts once.

**Example**

To illustrate the four measures, I rely Davis’ (1940) Southern Women Dataset. The meeting attendance of 18 women at 14 meetings is recorded in this dataset. The table below shows the result of the four measures (Newman’s, 2001, projection method is used for closeness and betweenness as the interaction-level among participants at smaller events are likely to be higher).

node | two-mode degree | one-mode degree | closeness | betweenness |
---|---|---|---|---|

EVELYN | 8 | 17 | 0.053 | 5 |

LAURA | 7 | 15 | 0.051 | 1 |

THERESA | 8 | 17 | 0.060 | 48 |

BRENDA | 7 | 15 | 0.050 | 1 |

CHARLOTTE | 4 | 11 | 0.044 | 0 |

FRANCES | 4 | 15 | 0.041 | 0 |

ELEANOR | 4 | 15 | 0.043 | 0 |

PEARL | 3 | 16 | 0.037 | 0 |

RUTH | 4 | 17 | 0.043 | 0 |

VERNE | 4 | 17 | 0.045 | 0 |

MYRNA | 4 | 16 | 0.042 | 0 |

KATHERINE | 6 | 16 | 0.052 | 0 |

SYLVIA | 7 | 17 | 0.054 | 11 |

NORA | 8 | 17 | 0.059 | 60 |

HELEN | 5 | 17 | 0.046 | 0 |

DOROTHY | 2 | 16 | 0.027 | 0 |

OLIVIA | 2 | 12 | 0.035 | 0 |

FLORA | 2 | 12 | 0.035 | 0 |

A key limitation of the betweenness measure can be seen in this table: most people attain a score of 0 (i.e., the measure is zero-inflated). The pair-wise correlations among the measures are reported below. While all measure have high correlations, it is interesting to note that the two-mode degree-measure has a higher correlation with closeness and betweenness than the one-mode degree-measure. This might suggests that the computationally cheap two-mode degree-measure is better able to replicate the computationally expensive closeness and betweenness measures.

1 | 2 | 3 | 4 | |
---|---|---|---|---|

1: two-mode degree | 1.00 | |||

2: one-mode degree | 0.51 | 1.00 | ||

3: closeness | 0.95 | 0.44 | 1.00 | |

4: betweenness | 0.59 | 0.34 | 0.64 | 1.00 |

**Want to try it with your data?**

The measures can be calculated using tnet. First, you need to download and install tnet in R. Then, you need to create an edgelist of your network (see the data structures in tnet for two-mode networks). The commands below show how the tables above were created.

# Load tnet and the Southern Women Dataset library(tnet) data(tnet) net <- Davis.Southern.women.2mode # Calculate two-mode degree out <- degree_tm(net, measure="degree") # Create one-mode projection net1 <- projecting_tm(net, "Newman") # Calculate one-mode degree tmp <- degree_w(net1)[,"degree"] # Append to table out <- data.frame(out, onemodedegree=tmp) # Calculate closeness and append to table tmp <- closeness_w(net1 )[,"closeness"] out <- data.frame(out, closeness=tmp) # Calculate betweenness and append to table tmp <- betweenness_w(net1 )[,"betweenness"] out <- data.frame(out, betweenness=tmp) # Download and set names out[,"node"] <- read.table("http://opsahl.co.uk/tnet/datasets/Davis_southern_club_women-name.txt") # Pair-wise correlation table tmp <- matrix(nrow=4, ncol=4) tmp[lower.tri(tmp)] <- apply(which(lower.tri(tmp), arr.ind=TRUE)+1, 1, function(a) cor.test(out[,a[1]], out[,a[2]])$estimate)

**References**

Brandes, U., 2001. A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25, 163-177.

Davis, A., Gardner, B. B., Gardner, M. R., 1941. Deep South. University of Chicago Press, Chicago, IL.

Dijkstra, E. W., 1959. A note on two problems in connexion with graphs. Numerische Mathematik 1, 269-271.

Freeman, L. C., 1978. Centrality in social networks: Conceptual clarification. Social Networks 1, 215-239.

Newman, M. E. J., 2001. Scientific collaboration networks. II. Shortest paths, weighted networks, and centrality. Physical Review E 64, 016132.

Opsahl, T., 2013. Triadic closure in two-mode networks: Redefining the global and local clustering coefficients. Social Networks 35, doi:10.1016/j.socnet.2011.07.001.

Opsahl, T., Agneessens, F., Skvoretz, J., 2010. Node centrality in weighted networks: Generalizing degree and shortest paths. Social Networks 32 (3), 245-251.

1.Krishna | August 10, 2012 at 6:44 pmHi Tore, when I was using degree_tm for a two mode network, it only gives degree values for primary nodes, is there a way to get the degrees for secondary nodes as well?

2.Tore Opsahl | August 13, 2012 at 3:43 pmHi Krishna,

The best way is simply to use a reversed edgelist. For example, you can use the command degree_tm(net[,2:1]) for a binary two-mode network called net, and degree_tm(net[,c(2,1,3)]) for a weighted two-mode network.

Hope this helps,

Tore

3.Abdul Waheed Mahesar | November 25, 2014 at 5:04 amHi Dear Tore,

Why in 2-mode networks the betweenness score is 0. What can be a reason for this limitation. I’m working on 2-mode network and I have observed such type of results in my network.

Thanks

4.Tore Opsahl | December 2, 2014 at 2:44 amHi Abdul,

There is no such limitation. Please send me an email with the data and code, and I will have a look at it.

Tore

5.Abdul Waheed Mahesar | December 2, 2014 at 4:47 pmThank you very much for your kind concern.

I have sent my data set on your email.

Kind regards,

6.Judith | September 30, 2016 at 5:34 pmThanks a lot for your invaluable resources!

If I would be interested in the meeting groups (as primary notes) rather than the women does the Newman projection method still make sense?

7.Tore Opsahl | September 30, 2016 at 9:34 pmHi Judith,

I am not sure. The method would basically assume that each participant contributes 1 to a meeting’s sum of tie weights. If a woman attended just two meetings, 1 would be added to their tie’s weight. If another woman attended 3 meetings, each tie between the three meetings would be increased with 0.5. I think it does depend on what your research question is.

From an implementation perspective, you can just swap the columns of the network object before projecting (e.g., net2 <- net[,c(2,1,3)]).

Best,

Tore

8.culturedriveninnovation | October 3, 2016 at 1:07 pmMany thanks, Tore!

I already did the computations and compared the different projection methods. This way of applying the Newman method is not exactly what I’d like to reflect but it’s better than the other methods.

I’m working with groups and members of meetup.com. Positive RSVP’s by members to events of a group make up the weights. I’m seeing the groups as sources for information and innovation and perform community detection to identify clusters of groups. Ideally, the projection accounts for the higher level of interaction and quality of information exchange among smaller groups. I assume by projecting onto the groups this has similar results (probably due to a long-tail effect), but rather reflects concepts of exclusivity and loyalty of groups’ members.