# Filed Under #macroecology

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