nw2nested
Nestedness of a two-mode network: NODF and C-score
Syntax
nw2nested [netname] [, lev:el(#) silent]
lev:el(#) |
the mode whose pairs of nodes enter the C-score, 1 or 2; default level(2) (the columns of the matrix, as in bipartite::C.score) |
silent |
suppress the output |
Description
nw2nested measures how nested a two-mode network is, the question asked of the species-by-site and plant-pollinator matrices of ecology and of any membership matrix in which the small groups are subsets of the large ones. NODF is the nestedness metric based on overlap and decreasing fill of Almeida-Neto et al. (2008): for every pair of nodes of one mode with different degrees it takes the percentage of the ties of the node with the smaller degree that the other node has too (0 for equal degrees), and averages over all pairs of both modes (NODF) or over the pairs of one mode. The C-score of Stone and Roberts (1990) counts the checkerboard units, the pairs of nodes that each have a partner the other lacks, and averages over all pairs of nodes of one mode; the normalised form divides each count by its largest possible value for the two degrees (the form of bipartite::C.score(normalise = TRUE)). The result does not depend on the order of the nodes.
Ties are read as present or absent; tie values are ignored. A pair with an empty or full node has no normalised C-score and is left out of its mean.
Options
level(#) chooses the mode whose pairs of nodes enter the C-score. The default 2 uses the nodes of the second mode (the columns of the matrix with the first mode as rows). NODF always uses both modes.
Supported network types
Binary: yes. Directed: not applicable (a two-mode network is undirected). Valued: tie values are ignored (presence of a tie). Two-mode: yes - the command needs a two-mode network and uses the biadjacency matrix of the two modes (bipartite::nested, vegan::nestednodf, bipartite::C.score).
Stored results
nw2nested stores in r():
- Scalars
r(nodf)— NODF, percentr(nodf_mode1)— NODF among the nodes of mode 1, percentr(nodf_mode2)— NODF among the nodes of mode 2, percentr(cscore)— mean number of checkerboard units per pairr(cscore_norm)— mean normalised C-score, 0 to 1 (bipartitereports it times 100)r(cscore_pairs)— number of pairs in the normalised meanr(level)— mode of the C-score pairs
References
Almeida-Neto, M., P. Guimaraes, P. R. Guimaraes, R. D. Loyola, and W. Ulrich. 2008. A consistent metric for nestedness analysis in ecological systems. Oikos 117: 1227-1239.
Stone, L., and A. Roberts. 1990. The checkerboard score and species distributions. Oecologia 85: 74-79.
nwcommands version 3.17.6, 9 November 2026 (check your installed version)