Neutral theory of community ecology aims at providing a mechanistic null hypothesis to study biodiversity patterns. However, it has been little developped for the analysis of co-occurrence data, where it remained mostly focused on community-wide statistics about covariance among species occurrences, which proved little efficient at detecting deviation from neutrality. It has been repeatedly suggested that stronger neutrality tests may be obtained by moving towards a more analytical approach of species composition in communities. In particular, searching for groups of species that behave non-neutrally one with another - a structure reminiscent of the concept of 'guild' in community ecology - has proven successful in the analysis of spatio-temporal patterns of relative abundances, and may also generate new insights on co-occurrence patterns. However, an important obstacle is the lack of a tractable neutral sampling theory of species presence-absence to develop new tests with sound mathematical background and well undertood instrumental hypotheses.
Here, I propose a first step towards developping such a sampling theory. I show that a simple and general form of co-occurrence sampling formula can be derived from neutral theory first principles with limited instrumental assumption. This leads to the prediction that two species should show a constant ordination of their presence probability among sites, which opens the way to tests of the 'rank consistency' of species pairs. A systematic pairwise application of this test yields a species rank consistency network, the modules of which may reveal species groups where rank consistency holds within groups but ranks are unconsistent among groups. Such 'neutral modules' of species can be biologically interpreted by relating their composition to species traits and relating their spatial distribution to local environmental conditions. We validated our framework on virtual data generated from a metacommunity model with environmental filtering. We then used it to revisit two published examples of plant communities : (i) compositional changes in tropical tree communities along a rainfall gradient in Western Ghats, India; (ii) Thymus vulgaris effect on mediterranean herbaceous communities in Saint-Martin-de-Londres basin, France. In both cases, we retrieved important results from previous studies while using only presence-absence of plant species, hence illustrating the relevance of our approach.