Most network analysis programmes are restricted to simple undirected binary one-mode static networks. Nevertheless, as I hope the other sections of this site have shown, studying richer types of network data can enable us to uncover and study interesting organising principles as well as measuring networks more accurately. The lack of software programmes to analyse richer forms of network data is forcing many non-programming researchers to simplify their data and remove the richness. To fill this gap, tnet is a package written in the statistical software R that currently can analyse weighted networks, two-mode networks, and longitudinal networks (datasets with time-stamped ties).
To the best of my knowledge, there are no programmes that can both analyse the richer forms of network data and allow users to create their own functions. On the one hand, programmes like UCINET and Pajek have a small set of functions for weighted and two-mode networks, but they do not allow users to programme additional functions (Batagelj and Mrvar, 2007; Borgatti et al., 2002). Therefore, researchers proposing new measures must create stand-alone programmes to deal with a single aspect of weighted networks (e.g., Brandes, 2001; Newman, 2001; Opsahl et al., 2008; Opsahl and Panzarasa, 2009). On the other, a number of packages for analysing networks has been created within the open-source statistical programme R, notably the sna and statnet-packages (Butts, 2006; Handcock et al., 2003). These packages allow researchers to create additional functions on top of existing ones. This ability reduces the time spent on programming greatly, and let researchers focus on the contribution to the literature instead. For example, if someone has already written a function for identifying the shortest paths in a network, a researcher that would like to extend this measure can simply work on this code without programming the function from scratch. However, the sna and statnet-packages rely on the basic network-package for data structures to represent networks (Butts et al., 2008). This basic package does not have data classes for weighted, two-mode, and longitudinal networks. Therefore, to ease the development of new functions for these networks, a new platform is needed. tnet represent an attempt to create such a platform. Although it is a user-written package in R, it does not rely on the network-package.
Compiled versions and the source code of tnet are available through the CRAN servers. If you are using the Windows version of R, you should be able to install tnet by going to the ‘Package’-menu in R, opening ‘Install package(s)’, selecting a server close to you, and then, choosing ‘tnet’ from the list. For specific details on how to install, update, and load tnet, see the installation-page.
Network data is handled in an edgelist format in tnet. This is a rectangular format where each row is a tie. The edgelist format is more efficient when networks are sparse (the number of ties is much smaller than the number of nodes squared). The functions can also read one-/two-mode matrices with more than 4 nodes; however, these will automatically be converted to edgelists. Unlike other R-packages, tnet does not utilise special object classes. It simply use a data frame, which increase transparency and -hopefully- helps researchers understand which data is analysed.
For one-mode networks, the data frame should have three columns where the first column contains the sender or originator of the tie, the second column contains the receiver or target node of the tie, and the third column containing the tie weight. Do note that for undirected networks, each tie must be mentioned twice (once in each direction). Read more…
Two-mode networks should be represented as either a two- or three-column data frame where the first column contain the primary or top nodes, the second column contains the secondary or bottom nodes, and the optional third column containing tie weights. As weighted two-mode network can be confused with weighted one-mode networks, it is important to run
as.tnet(net, type="weighted two-mode tnet") before using any analysis functions. Read more…
Longitudinal data should represented by a four column object. The columns correspond to (1) the timing using the following format surrounded by quotes: “YYYY-MM-DD HH:MM:SS”, (2) the sender or originator of the tie, (3) the receiver or target node of the tie, and (4) the tie weight. Unlike the one-/two-mode formats, the tie weight can take negative values, which signal a weakening of the tie. Read more…
The various network measures are covered in their respective sections of this website and the R-documentation. Additionally, there are a number of functions for transferring network data between programmes available.
For the convenience of tnet users, I have collected a number of network datasets that were available on the Internet, and made them conform to the required standard. Please do cite the mentioned reference if you use a dataset. It is possible to downloaded the networks in their native form and transformed versions. For example, the Facebook-like Social Network is available as a longitudinal one-mode network (native form) and as a static one-mode network. Read more…
tnet, as the information on this blog, is published under the Creative Commons Attribution-Noncommercial 3.0-lisence. This means that you are free to:
· share (copy, distribute and transmit)
· remix (adapt)
under the following conditions:
· attribution (you must cite or link to it)
· noncommercial (you may not use it for commercial purposes; contact me).
Barrat, A., Barthelemy, M., Pastor-Satorras, R., Vespignani, A., 2004. The architecture of complex weighted networks. Proceedings of the National Academy of Sciences 101 (11), 3747-3752. arXiv:cond-mat/0311416
Batagelj, V., Mrvar, A., 2007. Pajek: Program for Large Network Analysis: version 1.20. http://pajek.imfm.si/.
Borgatti, S. P., Everett, M. G., Freeman, L. C., 2002. Ucinet for Windows: Software for Social Network Analysis. Analytic Technologies, Harvard, MA.
Brandes, U., 2001. A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Sociology 25, 163-177.
Butts, C. T., 2006. sna-package: Package for Social Network Analysis. R package version 1.4.
Butts, C. T., Handcock, M. S., Hunter, D. R., 2008. network: Classes for Relational Data. http://statnet.org/.
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.
Handcock, M. S., Hunter, D. R., Butts, C. T., Goodreau, S. M., Morris, M., 2003. statnet: Software Tools for the Statistical Modeling of Network Data. http://statnetproject.org.
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.
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., Panzarasa, P., 2009. Clustering in weighted networks. Social Networks 31 (2), 155-163.