European Commission - JRC - IES
Home      Documentation      Download      Contacts


1 - Overview

2a - Using NeD

2b - Using Static NeD

3 - Input

4 - Output

5 - Limitations

6 – Technical details

7 – References


In the context of biogeography, the word 'Nestedness' indicates a situation where species occurring at the site of interest are always present in a more species-rich site, whereas species absent from the site of interest never occur in a less species-rich one. Thus, if species occurrences are arranged in a species-area matrix, and the rows and columns of that matrix are ordered according to their respective totals, the matrix is nested if most of its presences are concentrated in the upper left triangle (Ulrich et al. 2009). NeD makes it possible to easily compute nestedness using the most robust available combination of measures and null models. NeD is implemented as a dynamic web system using the open source scripting language Python (van Rossum and de Boer 1991) and Django web framework (Holovaty and Kaplan-Moss 2007). This means that you can use NeD online, without need to install anything on your PC. Additionally, a static version of the software is available for download. With static NeD you can automatize multiple (“batch”) analyses. Otherwise, there are no differences between online and static NeD.

2a - USING NeD

Computing nestedness with NeD is straightforward, and requires only three simple steps:

a) Copy and paste your matrix in the text box on the main page or, alternatively, upload it from a text file;
b) Indicate if you want to exclude empty rows and columns from nestedness computation (note that empty rows and columns will always be excluded if you select NODF metric);
c) Select which nestedness metric(s) you want to include in computation (among NODF, MT and BR);
d) Select a null model if you wish to calculate a Z-value, Relative Nestedness (RN) and the associate probability; you can also decide how many null matrices NeD should use to compute Z-values and RN.

As an additional feature, if you just want to try out the software, or if you want to make some experiments to learn more about nestedness indexes and null models, you can ask NeD to generate and analyse a square random matrix with a degree of nestedness ranging from 0 (complete randomness) to 9 (perfect nestedness).


In order to use static NeD download the zipped folder named from the download page. This archive includes a single folder named Static_NeD. Extract this folder anywhere on your pc. Then open this folder and click on the executable file called NeD.exe. After this, the program will automatically open your web browser on a local version of NeD homepage. Static NeD includes all the features available from the online version. Additionally, the static version can automatically perform multiple analyses for all the valid matrices included in a folder. In order to use this functionality you just have to paste the complete path to the matrix folder in the dedicated input field. Please note that you should not modify the contents of Static_NeD directory. If you experience any problems, please contact the developers at


Matrix Format Recognition (MFR) is one of NeD’s most interesting features. MFR allows NeD to automatically recognize a wide range of matrix formats (including all the formats required by the available nestedness software). Although most of your binary matrices are probably already readable by NeD, for sake of clarity, here follows some basic rules to create a NeD-compatible matrix: a) Matrix text files should contain only the matrix (with or without row and/or column labels); b) If you use row and/or column labels, be sure that their respective numbers match those of rows and columns (i.e. use single words, such as speciesA and not species A); c) You can separate entries with commas, spaces or tabulations, even if separators are not mandatory. If you do not separate entries, row and column labels should consist of a single character (in order to accomplish point b, i.e. number of row and column labels must match number of rows and columns). Example matrices can be obtained from download page.


Output page includes useful information about the uploaded matrix (file name, number of rows, columns and occurrences), nestedness indices, and (if calculated) Z-values (Z), Relative Nestedness (RN) and respective probability levels. For each selected nestedness metric, Z-values are computed as:

Z= (NIr-mean(NIs))/std(NIs),

while RN values are computed as:

RN= (NIr-mean(NIs))/mean(NIs),

where NIr is the nestedness index (for the selected metric) of the matrix under examination, NIs is the set of index values for the null matrices generated by the program, and std(Nls) is their standard deviation.

Descriptive statistics of the index values of the null matrices are reported as well. For NODF, Z-values > 1.64 indicate significance at P = 0.05, while for BR and MT Z-values < -1.64 indicate significance at P = 0.05. NeD will report also the order of rows and columns in both the original matrix and the corresponding packed one. In addition, NeD will display graphics of both the original (submitted) matrix and the maximally packed matrix. In order to preserve output clarity, in batch analyses results will be summarized in a single table (ready to be copied and pasted to a text file or to an electronic spreadsheet), while row and column order, and graphics will not be displayed.


In order to not overuse hosting server resources, the online version of NeD accepts matrices of maximum 22500 cells (150×150) and a maximum of 999 null matrices, whereas the static version has no explicit limits in both matrix size and null matrices. However, you should be aware that nestedness computation (especially for NODF and MT) for large matrices could take a long time. NeD has been coded in Python, which is a high-level programming language and offers great code readability. The other side of the coin is that code execution in Python is generally slower than in other lower level languages. However, for medium size matrices (say smaller than 100×100), NeD shows performances comparable to those of the other available nestedness software. In addition, the source code of nestedness functions is freely available. Please note that NeD is not aimed to be the best performing among available nestedness calculators. Its main purpose, is to be as much user friendly as possible and to provide students and researchers with the simplest tool for exploratory nestedness analyses. Yet, despite its simplicity, NeD includes the most accepted nestedness metrics and null model algorithms, making possible to perform also batch analyses with a minimum effort in input formatting and output interpretation. If you have to compute nestedness for very large matrices, or are not satisfied with NeD features and/or performance, you could be interested in the following programs:

Nestedness Temperature Calculator (Atmar and Patterson 1993);
BinMatNest (Rodríguez-Gironés and Santamaría 2006);
Aninhado (Guimarães and Guimarães 2006);
Nestedness (Ulrich 2006);
NODF (Almeida-Neto and Ulrich 2011).

6 - TECHNICAL DETAILS: Matrix package, Nestedness Metrics and Null Models

6.1 - Matrix packing

The way a matrix is packed can significantly affects nestedness results. NeD uses the most straightforward packing procedure, reordering the original matrix according to row and column totals, which is as well the default method in most of the available nestedness programs.

6.2 - Available metrics
There are at least eigth different metrics that have been proposed to compute nestedness (see Ulrich and Gotelli 2007; Ulrich et al. 2009). Yet, most of them have been severely criticized, and only Matrix Temperature (MT), Brualdi and Sanderson Discrepancy (BR), and NODF are recommended and generally used (see Ulrich and Gotelli 2007, Ulrich et al. 2009). As the main purpose of NeD is to keep things simple, and to provide users with a simple interface for exploratory analyses, NeD implements only the aforementioned three nestedness metrics:

- MT (Matrix Temperature):
MT uses the Euclidian distances of unexpected empty or filled cells from the isocline that separates presences from absences in a perfectly nested matrix. The sum of these distances is rescaled relative to the maximum possible value for a given matrix size and fill.

- BR (Brualdi and Sanderson Discrepancy):
BR is a count of the number of discrepancies (absences or presence) that must be 'corrected’ to produce a perfectly nested matrix.

- NODF (nestedness measure based on overlap and decreasing fills):
NODF is the percentage of presences in inferior rows and in right columns that are in the same position (column or row) of the presences in, respectively, upper rows and left columns with higher marginal totals for all pairs of columns and of rows.

6.3 - Available null models
We provide five null models to assess significance of the selected metric/s (see Guimarães and Guimarães 2006; Ulrich and Gotelli 2007):

1) EE (equiprobable row totals, equiprobable column totals) maintains the total number of species occurrences in the matrix, but allows both row and column totals to vary freely.

2) CE (proportional row totals, proportional column totals) assigns to each cell a probability to be occupied proportional to the corresponding row and column totals. The probability of being occupied of a cell belonging to the i-th row and to the j-th column is computed as:


where TotRi is the number of presences in the row i, TotCj is the number of presences in the column j, C is the number of matrix columns and R is the number of matrix rows.

3) FE (fixed row totals, equiprobable column totals) maintains observed row totals (i.e. species occurrence frequencies) but allows column totals (i.e. species richness per site) to vary randomly.

4) EF (equiprobable row totals, fixed column totals) maintains observed column totals (i.e. species richness per site) but allows row totals (i.e. species occurrence frequencies) to vary randomly and equiprobably.

5) FF (fixed-fixed) maintains both observed row and column totals.

6.4 - NeD testing
The combinations of nestedness metrics and null models available from NeD allow users to perform analyses with the most robust currently available parameter set-ups (see Ulrich et al. 2009). To evaluate robustness of NeD results, we analysed 270 matrices (taken from Atmar and Patterson 1993) with NeD and other packages (NODF for NODF, and Nestedness for BR and MT). Outputs were very consistent, with values usually differing for the second or third decimal digit. Under the FF null model, Pearson correlation coefficients between the values obtained with NeD and those produced by other packages were r = 0.9999 for NODF (y = 0.9990x - 0.0248), r = 0.9613 for T (y = 0.8962x - 1.1502) and r = 0.9988 for BR (y = 0.9950x - 0.9129), with slopes of regression lines close to 1 and intercepts close to 0.


Almeida-Neto, M., Ulrich W. 2011. A straightforward computational approach for quantifying nestedness using abundance data. Environmental Modelling and Software 26: 173-178.

Atmar, W., Patterson, B.D. 1993. The measure of order and disorder in the distribution of species in fragmented habitat. Oecologia 96: 373-382.

Guimarães, P.R., Guimarães, P. 2006. Improving the analyses of nestedness for large sets of matrices. Environmental Modelling and Software 21: 1512-1513.

Holovaty, A., Kaplan-Moss, J. 2007. The Definitive Guide to Django: Web Development Done Right. – Apress.

Rodriguéz-Gironés, M.A., Santamaría, L. 2006. A new algorithm to calculate the nestedness temperature of presence-absence matrices. Journal of Biogeography 33: 924-935.

Ulrich, W. 2006. Nestedness – a FORTRAN program for calculating ecological matrix temperatures.

Ulrich, W., Almeida-Neto, M., Gotelli, N.G. 2009. A consumer’s guide to nestedness analysis. Oikos 118: 3-17.

Ulrich, W., Gotelli, N.J. 2007. Null model analysis of species nestedness patterns. Ecology 88: 1824–1831.

van Rossum, G., de Boer, J. 1991. Interactively Testing Remote Servers Using the Python Programming Language. – CWI Quarterly 4: 283–303.

© Giovanni Strona & Simone Fattorini 2014

Powered by Django.