Random Two-mode Networks
When analysing network and computing measures, it is difficult to gauge whether the outcome is “high” or “low”. For example, is a 0.3 clustering coefficient high or low? Random networks based on an observed network can be used as to create a benchmark value. In other words, an observed value (e.g., a clustering coefficient) can be compared to the distribution of clustering coefficient from corresponding random networks.
There are many procedures or null models for creating random networks in one-mode networks. These procedures vary in how much they randomise an observed network. Traditionally, classical (also known as Bernoulli or Erdos-Reyni) random networks were the commonly used. These networks are constructed by using the same number of nodes, and assigning each dyad a uniform probability of having a tie based on the number of observed ties. In these networks, the degree distribution is uniform or Poisson. However, such a distribution rarely exist in reality. In fact, most real-world distributions are skewed. In response to the lack of comparability between observed networks and classical random networks, a set of randomisation procedures that maintain additional features has been developed. First, by reshuffling ties in an observed network, it is possible to create random networks that maintain each node’s number of ties as well as the overall number of nodes and ties (Molloy and Reed, 1995). Second, for weighted networks, it is also possible to reshuffle only the weights. By maintaining the ties and simply reshuffling tie weights, features based on connectedness are maintained (e.g., the size of the largest interconnected group of nodes; Opsahl et al., 2008).
The procedures for creating random networks in one-mode networks can be ported to two-mode networks. This page describes the counterparts to classical random network, tie reshuffled, and weighted reshuffled networks.
Classical Random Two-mode Networks
Classical random networks are created by setting the number of nodes and giving all possible ties a uniform probability of being formed. This probability is often the density of networks (i.e., number of directed ties or 2x undirected ties over Nx(N-1)). This procedure can be ported to two-mode networks by setting the numbers of primary and secondary nodes and giving all possible ties (i.e., ties between nodes in different groups) a uniform probability of being formed. To create corresponding networks, this probability would be using the two-mode density metric instead of the one-mode one: number of ties divided by the product of the numbers of primary and secondary nodes. This procedure is implemented in the function rg_tm in tnet.
As nodes’ degree are not uniformely distributed, a second procedure for creating random networks consists in reshuffling the topology, reaching the maximally random network with the same degree distribution as the observed network (Maslov and Sneppen, 2002; Newman, 2003). For two-mode networks, a similar procedure can be conducted that ensures that nodes maintain their number of connections. This null model is implemented in the rg_reshuffling_tm-function with the option parameter set to “links”.
While the link reshuffling procedure can be applied to binary networks, another procedures is possible to use when dealing with weighted two-mode networks. The weight reshuffling procedure consists simply in reshuffling the weights globally in the network (Opsahl et al., 2008). This null model maintains the topology of the observed network. Therefore, the number of ties originating from a node (degree) does not change. Moreover, other features, such as the giant component does not change as well. This null model is also implemented in the rg_reshuffling_tm-function with the option parameter set to “weights”.
Want to test it with your data?
The randomisation procedures are implemented in tnet. First, you need to download and install tnet in R. Then, you need to create an edgelist of your network (see data structures in tnet for weighted two-mode networks). The commands below show how corresponding random networks to the Davis’ Southern Women data (Davis et al., 1941) can be created.
# Load tnet and Davis’ Southern Women network library(tnet) data(tnet) net <- Davis.Southern.women.2mode # Bernoulli / Erdos Renyi (find the number of nodes and density first) n1 <- length(unique(net[,1])) n2 <- length(unique(net[,2])) ptie <- nrow(net)/(n1*n2) rg_tm(ni=n1, np=n2,ties=ptie) # Tie reshuffling rg_reshuffling_tm(net, option="links") # Weight reshuffling (add random weights first) netw <- cbind(net, sample(1:4, size=nrow(net), replace=TRUE)) rg_reshuffling_tm(netw, option="weights")
Davis, A., Gardner, B. B., Gardner, M. R., 1941. Deep South. University of Chicago Press, Chicago, IL.
Molloy, M., Reed, B., 1995. A critical point for random graphs with a given degree sequence. Random Structures and Algorithms 6, 161-180.
Opsahl, T., Colizza, V., Panzarasa, P., Ramasco, J. J., 2008. Prominence and control: The weighted rich-club effect. Physical Review Letters 101 (168702). arXiv:0804.0417.
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.