# Filed Under #macroecology

Jul 16, 2021

### NODF nestedness worked example

The purpose of this blog post is to work through the example in Almeida-Neto et al. (2008) for calculating the NODF nestedness metric. We’re interested in a species-site presence-absence matrix, which is a binary matrix with rows corresponding to species, columns corresponding to sites, and the presence of a species at a site represented by a 1. In a perfectly nested matrix, the sets of species at the sites and the sets of sites at which a species is present form proper subsets of each other. The figure below shows an example of a perfectly nested matrix. An example of...Sep 8, 2020

### Where does Hubbell's 'species generator' come from?

On page 289 onwards, Hubbell (2001) gives an algorithm for sequentially sampling individuals from the neutral metacommunity and obtaining their species identities. The algorithm makes use of a quantity he calls the ‘species generator’ \[\frac{\theta}{\theta + j - 1}\] where \(\theta\) is the “fundamental biodiversity number” and \(j\) is the index of the individual drawn (1st, 2nd, …). In Figure 9.1 he gives a flow diagram for the algorithm, but it is perhaps easier to understand from reading code directly. From the hubbell package for R, Jari Oksanen authored this code: function(theta, J) { community <- NULL for (j in...Feb 22, 2020