This repository is a set of functions used to derive significant species pairs or potential co-occurrences from presence/absence data. To this end, we use a text analysis algorithm (Dunning et al., 1993; Wahl and Gries, 2018) that identifies pairs of species which co-occur more frequently than expected by their individual presence patterns. The algorithm assigns an association score; called likelihood ratio; to each possible species pair. This likelihood ratio compares the probability of two species co-occurring to the probability of one species occurring without the other or when both species are absent using Shannon's entropy. We further distinguish between strong co-occurrences and strong one-sided occurrences and co-absences by comparing the observed co-occurrence frequency with the product of the individual species presences (Evert, 2009).
The functions in this script where used in Hofmann et al., 2021 to derive species networks, and in Benedetti et al., 2021 to characterize the changes in potential species co-occurrences with climate change.