Competition can lead to unexpected patterns in tropical ant communities

from nesting in bird s nest ( Asplenium ) in the which and every occurred together, to for patterns associated with interspeci c competition. found evidence for competition, but the was the of we expected. than species segregation the classical hallmark of competition d we found species aggregation. Moreover, our approach of testing indi- vidual pairwise interactions mostly revealed spatially positive rather than negative associations. Signi ﬁ cant negative interactions were only detected among large ants, and among species of the subfamily Ponerinae. Remarkably, the results from this study, and from a corroborating analysis of ant communities known to be structured by competition, suggest that competition within the ants leads to species aggregation rather than segregation. We believe this unexpected result is linked with the displacement of species following asymmetric competition. We conclude that analysing co- occurrence frequencies across complete species assemblages, separately for each species, and for each unique pairwise combination of species, represents a subtle yet powerful way of detecting structure and compartmentalisation in ecological communities.


Introduction
The question of whether rules do or do not govern the coexistence of species has interested ecologists for decades (Bell, 2001;Chesson, 2000;Connor and Simberloff, 1979;Diamond, 1975;Hubbell, 2001;Leibold, 1995;Matthews and Whittaker, 2014). All species interact, both with their environment, and with each other. These interactions can be negative, as in the case of interspecific competition or predation, or the interactions can be positive, as in the case of mutualism or facilitation. The importance of positive interactions to the composition and stability of ecological communities is becoming increasingly acknowledged. Indeed, the overall balance between positive and negative interactions may be fundamental to the maintenance of biodiversity (Mougi and Kondoh, 2012;Wang et al., 2012). For example, parasitic species can only establish if their hosts are present (we define this as a positive interaction, since parasite and host usually occur together), and mutualists can face extinction if the partner species dies out (Koh et al., 2004). Interspecific interactions, whether positive or negative, cause shifts in the abundance of species, and generate communities with predictable composition (Hejda et al., 2009;Parr and Gibb, 2010).
Species segregation, the result of negative interspecific interactions, is traditionally associated with competition. However, species segregation in ecological communities may also result from environmental filtering (Kraft et al., 2015) and dispersal limitation (Hubbell, 2001). By controlling for these effects, a previous study revealed the importance of interspecific competition relative to stochastic processes in structuring arthropod decomposer communities (Ellwood et al., 2009). However, given that the physical tolerances and dispersal abilities of species are difficult to quantify, it is challenging to define the contributions of particular species, and of particular pairs of species, to the overall levels of competition within a community.
Here we suggest a way around such problems, using ants in a tropical rainforest to demonstrate our technique of analysing each potential interaction between species. Our analysis gradually drills down from overall co-occurrence patterns across an entire community to the analysis of co-occurrence in specific species pairs. Unlike previous studies, we can detect segregation (or the opposite, species aggregation) not only at the level of the entire community, but we can also identify specific species that co-occur with others less (or more) often than expected e for example, species that competitively exclude each other. Finally, we analyse co-occurrence between specific pairs of species, thus identifying pairs that often co-occur (e.g. if they are mutualists, or host and parasite), or ones that do not co-occur (e.g. through competitive exclusion).
The ant communities inhabiting litter-trapping epiphytic bird's nest ferns (Asplenium nidus) are an ideal study system to analyse interspecific competition and community assembly: ants are diverse, and often aggressively displace other species through direct behavioural interactions. Thus, competition is often thought to be a major factor in structuring ant communities, strongly affecting patterns of co-occurrence (Blüthgen and Stork, 2007;Cerd a et al., 2013). Ants compete for food or for nest sites (Blüthgen and Feldhaar, 2010), and should display direct competition for nest space within the fern's root mass. Thus the limiting resourcedspacedis both clearly defined and quantifiable, depending on the size of the fern (Ellwood and Foster, 2004;Ellwood et al., 2002;Fayle et al., 2012). In this view, the inhabitants of epiphytic ferns are analogous to communities on oceanic islands (Collins et al., 2011;. Explanations for large-scale patterns of ant co-occurrence sometimes refer to 'ant mosaics'. The rationale behind ant mosaics is that a small number of species exclude or selectively tolerate each other, while the remaining species are unaffected . Previous attempts to establish the existence of ant mosaics in tropical rainforest may have been thwarted by insufficient spatial resolution and poor statistical power (Blüthgen and Stork, 2007;Floren and Linsenmair, 2000;Ribas and Schoereder, 2002). Similarly, while it is known that nest sites in tropical rainforests are limited (Blüthgen and Feldhaar, 2010), previous studies (Fayle et al., 2013) of ant co-occurrence in bird's nest ferns have not examined pairwise species interactions, so the absolute strength of interspecific competition remains unclear. While our study of ant communities in epiphytic ferns is one of cooccurrence patterns in well-defined patches rather than ant mosaics (i.e. territories) in a contiguous habitat, we believe that studying the occupancy of patches that are competed for will help to shed light on questions surrounding the existence of ant mosaics. Performing analyses at small spatial scales may reveal patterns of aggregation or segregation that would otherwise be overlooked.
In the present study, we searched for evidence of competition for nest sites among fern-dwelling ants. Although our focus was on competition rather than environmental filtering, we wanted to include species interactions throughout the entire rainforest, rather than from an artificially delineated subset of the habitat. However, physical conditions differ between strata e e.g. the canopy experiences harsher abiotic conditions with stronger climatic fluctuations than the understorey (Nadkarni, 1994;Parker, 1995). Such environmental gradients affect levels of competition in the fern's decomposer communities (Ellwood et al., 2009), and in the structure of intertidal seagrass communities (Barnes and Ellwood, 2011a, b;2012a). With this in mind, we studied ant metacommunities in ferns from the canopy and the understorey. By removing the entire fauna from within the ferns and then allowing them to be recolonized, we were able to observe communities at different successional stages, where competition might differ e.g. due to dispersal limitation. We firstly analysed negative and positive interactions for the entire set of experimental ferns. Subsequently, we analysed whether competitive exclusion was detectable in specific subsets of ferns. Compared to the understorey, we expected that the harsher conditions of the canopy act as an environmental filter, thus reducing competition and leading to a less structured community. Furthermore, community structure should be lowest during early recolonisation, when dispersallimited competitors may have yet to reach the ferns. Finally, we searched for patterns of competition depending on the ant's body size, and on their subfamily membership.

Experimental design
We compared the structure of ant communities in 180 bird's nest ferns (Asplenium nidus) sampled from five emergent Parashorea tomentella (Dipterocarpaceae) trees in undisturbed lowland dipterocarp forest in Danum Valley, Sabah, Borneo (4 58 0 N, 117 48 0 E). We chose P. tomentella which, being of similar height and appearance provided standard microhabitats for epiphytic ferns. Along with other ferns, A. nidus is one of the most common epiphytes large enough to provide nesting space for ants in Southeast Asian rainforests (Tanaka et al., 2010). We distinguished 90 ferns from each of two heights: understorey (3e4 m) and canopy (45e50 m). Within each height, mature ant communities were sampled from pristine sets of 30 ferns that we ensured were as homogeneous as possible, by controlling for fern size, for season and for microhabitat. The entire fauna was removed from the ferns, which were then standardised to the same size and reintroduced onto the five P. tomentella trees (n ¼ 12 ferns per tree each for canopy and understorey). Half of the defaunated ferns were sampled after one month (early successional communities) and after eight months (more established communities), respectively. All ferns were of a similar size (range 2.2e3.4 kg fresh weight). See Appendix A1 for more details.

Statistical design
Our statistical approach measures whether the co-occurrence pattern for each species deviates significantly from what would be expected if species co-occurred at random. For each possible pair of species it calculates how many times those species co-occurred in the same fern ('number of associations'). The dataset is then shuffled, and species occurrences are randomly assigned to ferns. Like the C-score (Gotelli, 2000;Stone and Roberts, 1990), our algorithm is based on a site (i.e. fern) by species matrix, and uses presence/absence data. We present results from the C-score for comparison, using the fixed-equiprobable algorithm, in which each species is assigned the same number of occurrences as in the actual dataset (i.e. species abundances are maintained), but each fern is equally likely to be assigned an occurrence (Appendix A2.3). This was the correct algorithm to use, since the numbers of species per fern fitted a Poisson distribution significantly better than a negative binomial distribution (AIC: 711.4 vs. 713.4). For each of 1000 random simulations, we calculated the numbers of associations for each species pair. This distribution of numbers of associations was then compared to the observed value. Deviations were considered significant if the observed value fell into the lower or the upper 2.5% of random simulations, and additionally at the species and species pair level (see below) if the difference between the observed and expected values of the respective metric was at least 1. The latter criterion was applied to avoid erratic results in rare species, whose numbers of occurrences were too low for reliable conclusions. The P value (as shown in Table 1) is the proportion of simulated values that were more extreme than the observed value in the direction of the relevant tail. Each simulation thus yielded an upper and a lower P value (each one-tailed, with a ¼ 0.025). Since these P values reflect either segregation or aggregation, we termed them P seg and P agg , respectively.
First, we analysed co-occurrences at the 'community' level (yielding two P values: P nw-agg for a test of aggregation and P nw-seg for a test of segregation). This metric is analogous to the C-score. However, unlike the C-score, our method can simultaneously detect aggregation and segregation. Secondly, we analysed the 'species level', where we calculated whether every single species i cooccurred with any of the other species more (P sp(tot)(i)-agg ) or less (P sp(tot)(i)-seg ) frequently than expected, and whether it was the solitary inhabitant of a fern more or less often than expected (P sp(lone)(i)-agg and P sp(lone)(i)-seg ). Finally, we analysed the 'species pair level' to see whether specific pairs of species occurred together more or less often than expected (P spp-agg and P spp-seg ).
The proportion of species and the proportion of species pairs deviating from random were used here as community-level measures of compartmentalisation. At the species and species pair level, multiple P values were generated simultaneously. While we were able to analyse the proportions of non-random species, potential inflation of type I errors due to multiple testing could invalidate conclusions regarding the identity of the non-random species. In the results, we therefore report uncorrected P values, but also give results corrected for false discovery rate (FDR, see Appendix A2.1).

Comparison to a competitively structured community
To calibrate our results with data from a community known to be structured by competition, we applied the same analyses to an existing dataset of ants attending baits in a Northern Australian rainforest. In contrast to our fern dataset, which was based on nest sites, the Australian ants were surveyed at artificial baits made up of sugar and amino acid solutions, and thus competed for food instead of nest space. This dataset consisted of ant occurrence data from 53 trees at Cape Tribulation, Queensland, Australia. In this study, multiple baits were placed at each tree, and ant occupancy was recorded four to five times after placing them. Data from different baits were pooled for each tree. The ant community at these baits reflects a genuine ant mosaic, and aggressive displacement was confirmed by behavioural observations. Different analyses based on this dataset have been published elsewhere .

Testing for non-random co-occurrence in species subsets
Species that are more ecologically similar are expected to compete more strongly. We tested this hypothesis in two ways. First, the theory of limiting similarity (Hutchinson, 1959;MacArthur and Levins, 1967) predicts that species of similar body size should compete more intensely. While many different traits should influence interspecific competition, we hypothesized that similar body size should lead to similar nest site requirements, such that species with different body sizes are more likely to co-occur than species of similar size. We partitioned our dataset into species greater than or less than 5 mm and tested for competitive exclusion within these subsets of similar size. Second, by pooling species according to subfamily (see below), we were able to test for competitive exclusion between closely related species (see Appendix A2.1). Closely related species should inhabit similar Table 1 Evidence for segregation (P seg , P nw-seg ) or aggregation (P agg , P nw-agg ) at the community level, and proportions of species or species pairs deviating significantly from random expectations. For the C-score and the community level indices, the table shows one-sided P-values for a test of the 'fixed-equiprobable' hypothesis. Proportions in bold are significant (P < 0.025). For the percentages of deviant species or species pairs (those that significantly deviate from random expectation), values in bold indicate that they differ among the communities of the same block, i.e. with the same footnote number. All data, except for 'Australian community', refer to the dataset from Borneo. Large ants: 5 mm; small ants: < 5 mm.
niches and therefore compete more strongly. Having subsumed species into subfamilies, we were able to use the same algorithm to analyse co-occurrences at the 'subfamily' or 'subfamily pair' level. Subfamily co-occurrence was analysed using (1) a binary approach, i.e. presence or absence of a subfamily in a fern (P values with index 'bin'), and (2) a quantitative approach, which accounted for the number of species per subfamily present in a fern (P values with index 'quant'; see Appendix A2.1).

Ant community composition in epiphytic ferns
Our experiment yielded 162,019 ants from six subfamilies, 47 genera and 118 species, and a total of 379 occurrences. Only 29 species occurred in more than five ferns. Species richness was highest in the mature ant communities of pristine ferns (74 species, 3.8 ± 0.2 SE spp. per fern), followed by recolonized ferns after eight months (59 species, 3.4 ± 0.3 spp. per fern) and one month (46 species, 2.2 ± 0.3 spp. per fern) (Fig. 1). Species numbers per fern differed between the three recolonisation stages but not between height levels (GLM: stage: c 2 2 ¼ 25.3, p < 0.0001, height: c 2 All categories of ferns in the study had species in common. The number, and proportion, of shared species between the understorey and the canopy increased markedly from one month (4 spp./9%) to eight months (12 spp./ 20%) to mature communities in pristine ferns (23 spp./31%; Fig. 1). The composition of the ant communities differed between successional stages and heights (PERMANOVA: both pseudo-F > 1.3, p < 0.0001), but were not affected by the tree individuals bearing the ferns (PERMANOVA: pseudo-F ¼ 1.1, p ¼ 0.17).

Species co-occurrence at the community level
In communities structured by competition the Stone and Roberts (1990) observed C-score should be significantly higher than a C-score simulated at random (Gotelli, 2000). However, the simulated and observed C-scores for the fern ant communities were not significantly different (Table 1). To corroborate this seemingly anomalous result, we repeated our analysis on cooccurrence data from a genuine ant mosaic published in . In this paper, ant communities from Australia were shown to be structured by competition, with behavioural observations confirming overt aggression between participating ant species . The simulated and observed C-scores for the Australian ants were significantly different, but not in the direction we expected. Among the Australian ants, the observed C-score was significantly lower than the simulated C-score, suggesting aggregation rather than segregation. Similarly, our pairwise analysis at the community level found significantly more positive associations than expected, rather than fewer (Table 1). Our analysis also revealed significantly more positive associations (i.e. aggregation) among the fern ants, even though this was not detected by the C-score (Table 1; Fig. 2).

Species co-occurrence at the species level
We found more positive than negative associations in our fern dataset, making it qualitatively similar to the Australian dataset, but the quantitative results from the two studies contrast sharply. In the Australian ant mosaic 18 out of 34 species (53%) were positively (16 spp.) or negatively (2 spp.) associated   (Table 1; Fig. 3b). In contrast, of the 118 species found in the ferns, surprisingly few (5.9%) showed non-random associations with any other species: four showed more associations than expected (each P sp(tot)agg < 0.025) (Table 1; Fig. 3a), and three showed fewer associations than expected (each P sp(tot)seg or P sp(lone) seg < 0.025). After FDR correction, Anonychomyrma gilberti retained its negative association, and 15 species pairs retained their positive associations. In the fern dataset, no species remained significant after FDR correction.

Species co-occurrence at the species pair level
Among the fern ants, 33 unique pairs of species were positively associated with each other, and one pair was negatively associated. As in the previous species-level analysis, these are very few (0.5%) compared with the 6903 pairs possible (Table 1; Fig. 4a). Again, we see a sharp contrast with the strongly structured ant mosaic in Australia , which had 31 out of 561 non-random species pairs (5.5%) (Table 1; Fig. 4b).
Remarkably, three of the 33 species pairs which showed positive associations in the fern dataset involved the same Diacamma species (each P spp-agg 0.025): three ant species (a Polyrhachis and two Pheidole species) were only found together with this Diacamma species but not without it. In particular, the Polyrhachis species occurred 11 times with, but never without it (P spp-agg < 0.00001 in an analysis with 100,000 randomisations). After FDR correction, only this pair remained significant in the fern dataset. In the Australian dataset, three negatively (each involving Anonychomyrma gilbertii) and three positively associated species pairs remained significant after FDR correction.

Evidence for limiting similarity: body size
A specific prediction from the principle of limiting similarity is Fig. 1. Venn diagrams showing numbers of species unique to a particular time and height, and numbers of species shared between times and heights. For example, pristine ferns (1a) in the canopy had a total of 16 þ 23 ¼ 39 species. Of these 39 species, 23 also occurred in pristine understory ferns (and 16 did not), whereas eight species also occurred in canopy ferns one month after defaunation (and 31 did not). that similar body size increases competition between species, and therefore decreases the probability of co-occurrence between those species. Overall, occurrence of smaller ants (<5 mm) was unaffected by the presence of larger ones (5 mm) (Appendix A3). However, the size ratios between the 33 positively associated species pairs was 0.53 ± 0.045 SE, i.e. one species was roughly half the size of the other. In contrast, the single pair of negatively associated (mutually exclusive) species was of similar size (size ratio 0.92). This difference is significant (t-test: t ¼ 8.7, df ¼ 32, P < 0.0001).
Large species rarely co-occurred with other large species: significant segregation was detected in a dataset containing only large species (N ¼ 39 species, including 24 formicine and 9 ponerine species, 173 occurrences on 114 ferns; P nw-seg < 0.001). The C-score was significantly higher than random, similarly suggesting structuring by interspecific competition (P < 0.001, Table 1). In contrast, the communities of smaller species (N ¼ 79 species, 411 occurrences on 157 ferns), did not deviate from random models using either index, despite larger sample sizes (all P nw-seg 0.16).

Evidence for limiting similarity: subfamily membership
Another assembly rule based on the competitive exclusion principle is that competition between closely related species should be stronger than between distant relatives. We therefore analysed co-occurrence between and within subfamilies, assuming that mutual exclusion should be greater in ecologically more homogeneous subfamilies. Members of the Ponerinae, many of which are large and predatory, were more likely than expected by chance to be the only ant species in a fern (P sp(lone)-bin-seg ¼ 0.014, P sp(lone)quant-seg ¼ 0.005; N ¼ 13 species; average size 7.8 ± 1.1 SE mm). This was not found for any other subfamily (all other P sp(lone)-bin-seg , P sp(lone)-quant-seg > 0.15). In contrast, levels of co-occurrence were greater than expected among the Myrmicinae (2.5 ± 0.1 SE mm, N ¼ 50), which are mostly small, and among the Formicinae, which include small and large species (5.8 ± 0.5 SE mm, N ¼ 37) (Myrmicinae: P sp(tot)-bin-agg ¼ 0.014, P sp(tot)-quant-agg ¼ 0.001; Formicinae: P sp(tot)-bin-agg ¼ 0.005, P sp(ltot)-quant-agg ¼ 0.018).
By accounting for the number of co-occurrences between species within each subfamily, instead of just noting whether a subfamily was present in a fern, we tested whether members of the same subfamily excluded each other. However, despite a trend of competitive exclusion among the Ponerinae (P spp-quant-seg ¼ 0.062; N ¼ 13 species), none of the subfamilies significantly excluded each other (all other P spp-quant-seg > 0.13).

Competition under harsh vs. more equable conditions: canopy versus understorey ferns
We expected competition to be weaker in the canopy, where daily fluctuations in temperature and humidity are greater than in the understorey. Indeed, neither the C-score, nor the overall number of associations in our index, differed significantly from random expectations. Only one out of 68 species (1.5%), and 18 out of 2278 species pairs (0.8%), differed positively or negatively from random (Table 1). In the understorey, where physical conditions were more moderate (e.g. reduced fluctuations in temperature and humidity) we found stronger evidence for competition, but again this evidence took the form of aggregation rather than segregation. The C-score was significantly lower in the understorey than expected, and our index found significantly more positive associations (Table 1).

Evidence for dispersal limitation: early, middle and late succession ferns
In new communities, dispersal/competition trade-offs favour dispersers. Dispersal limitation under these circumstances will engender randomness in community structure (Bell, 2001;Hubbell, 2001). Indeed, after one month, neither the C-score nor the total number of associations in our index differed from random expectations (Table 1). However, after eight months, the C-score was significantly smaller than expected, again suggesting aggregation, and our index revealed significantly more positive associations ( Table 1). The proportion of significantly associated species (i.e. P sp(tot)seg , P sp(tot)agg , P sp(lone)seg or P sp(lone)agg < 0.025) was also highest after eight months (Table 1). As with the communities after one month, co-occurrence was random in the pristine, mature communities, suggesting that the strength of interspecific competition between early and late successional species peaked at intermediate stages of recolonisation.
Given the significant differences in competition between the canopy and the understorey, we wanted to be sure that patterns of recolonisation in the different habitats were not affected by canopy-understorey differences. We therefore repeated separate analyses for each time period in the two strata. Our results were unchanged. Pristine communities, and those after one month in both the canopy and in the understorey, remained random (P nwagg 0.46). Ant communities in canopy ferns after eight months For each species, boxplots indicate the simulated numbers of co-occurrences, while the red dots denote observed numbers of co-occurrences (with any other species) relative to the boxplot for that particular species. If the observed number of co-occurrences (red dot) is higher than the null expectation, then the species shows aggregatory behaviour ('tolerant'), while if the observed number of co-occurrences is lower than the null expectation, then the species shows segregatory behaviour ('intolerant'). Significant deviation from the null model is indicated with asterisks. The numbers give the number of occurrences for each species. The extent and vertical position of each boxplot was standardised to fit the graph.
were weakly aggregated (P nw-agg ¼ 0.029), although this effect was not strong enough to affect the overall canopy result. However, understorey ferns after eight months remained strongly aggregated (P nw-agg ¼ 0.005).

Discussion
We used a novel statistical approach to test for effects of competition during patch occupancy as ants colonized epiphytic bird's nest ferns in Borneo. Our statistical approach, in combination with the experimental setup of standardised ferns at different heights and different stages of recolonisation, was designed to dissect the ant community at multiple levels of environmental stress and ecological succession. We analysed the whole community, as well as single species, species pairs, and subfamilies.

Effects of asymmetric competition
Remarkably, the observed C-scores from our eight month ferns and the Australian ant mosaic were lower than C-scores simulated at random, although competition is thought to yield the opposite effect (Gotelli, 2000). The C-score essentially measures how often two species fail to occur together in a community; the underlying reasoning being that interspecific competition creates species segregation, which in turn leads to a 'checkerboard' distribution of species (Gotelli, 2000). But what if species aggregate rather than segregate? Competition between ant species is often asymmetric, with species differing in their competitiveness (Menzel et al., 2010a(Menzel et al., , 2010bSavolainen and Veps€ al€ ainen, 1988). For example, a typical ant mosaic is formed by dominant ant species, some of which (like Oecophylla) tolerate many subordinate species, while others (like Anonychomyrma) do not. In such a case, the overall species distribution will be clumped rather than uniform: some sites are occupied by Anonychomyrma, while Oecophylla and most subordinate ant species crowd into the remaining sites. For example, in the Australian ant metacommunity we analysed for comparison, Anonychomyrma was significantly intolerant (P sp(tot)seg < 0.001; 1.5 ± 0.6 co-occurring species), whereas Oecophylla was significantly tolerant (P sp(tot)-agg < 0.001; 5.7 ± 0.5 co-occurring species) (Fig. 3b). Thus, all subordinate species and Oecophylla each co-occurred with more species than they would if all species were randomly distributed across the sites. Under such a scenario, the C-score will be lower than random, and our index will give a higher number of associations (Fig. 2b). This result, while surprising, is plausible given previous studies of ant mosaics in which the number of positive associations reached or even exceeded the number of negative associations between abundant species (Blüthgen and Stork, 2007;Leston, 1975;Room, 1971). Such asymmetries may lead to species aggregation rather than species segregation.

Evidence for competition from analysing co-occurrence patterns
Deciphering the signature of interspecific competition from cooccurrence patterns is difficult and controversial. For example, the presence of highly dominant species alone may result in deterministic patterns (Barnes and Ellwood, 2012b). The current study is no exception in that we challenge current knowledge of species coexistence among ants. Our results suggest a shift in the relative importance of equalizing and stabilizing mechanisms, which essentially govern how rare species increase, and common species decrease in abundance (Chesson, 2000).
Based on our results, we suggest that a re-analysis of species cooccurrence for a wide range of taxa might be worthwhile. There may be structure in a community even if, at the community level, there is no difference from random expectations. To use ant mosaics as an example, let two mutually exclusive dominant ant species each tolerate a non-overlapping set of subordinate species. Overall, this community may show neither a clumped nor a uniform distribution, but one whichdat the community levelddoes not differ from random. This will be the case if neutral interactions between dominants and their subordinates are balanced by the competitive interactions between pairs of dominants (Blüthgen and Stork, 2007;Menzel et al., 2010a). Such a community is clearly structured: dominant species exclude each other, and subordinate ones never co-occur if they are associated with different dominant species. Although both the C-score and our communitylevel association index may fail to detect such a pattern, it is detectable using the proportion of non-random species or species pairs. These two measures will be higher in a structured community compared with a random one, and are therefore useful as measures of compartmentalisation or modularity, analogous to those used in bipartite communities (Dicks et al., 2002;Olesen et al., 2007).

Unexpectedly high stochasticity in community structure
It is striking that we found little evidence of species segregation and relatively little community structure in the ant communities of bird's nest ferns. This suggests that competition for nest sites is not as strong as assumed (Blüthgen and Feldhaar, 2010;Cerd a et al., 2013). One reason for the apparent lack of the 'traditional' hallmark of species segregation may be that some dominant canopy ants weave or excavate their own nests and therefore do not compete for nest sites. These species were outside the scope of the present study. However, our dataset included other dominants such as Crematogaster difformis, which nests in ferns (Tanaka et al., 2012), and several Dolichoderus and Pheidole species; competitive exclusion between these dominants at nest sites would have been detected. It is important to stress that the omission of some dominants from our dataset is not a sampling artefact; it is simply due to the fact that these species do not participate in competition for ferns as nest sites. Since species differ in their respective intensities of competition for different resources, it is probable that, depending on the resource under investigation, studies on interspecific competition may yield different results, even within the same community.

Is there limiting similarity?
Despite an overall lack of species segregation, large species showed strong competitive exclusion. We suggest that body size affects the degree of competition for nest sites between species, such that competition is highest for species with similar body sizes. The smaller species might have nesting habits diverse enough to co-exist in the same fern. Interestingly, the positively associated species pairs all were of different sizes, whereas the one pair of mutually exclusive species was of similar size. This corroborates the suggestion that co-existence in the same nest site is more likely among species of different body sizes (Kaufmann et al., 2003). However, body size is but one trait that affects interspecific interactions; and limiting similarity may apply for a wide variety of further ecological traits.
Among subfamilies, ponerine species excluded other ants, whereas members of other subfamilies did not. Competitive exclusion has repeatedly been shown to be highest among members of the same guild (Both et al., 2011;Collins et al., 2011), and should be more pronounced among related species since they are likely to be ecologically more similar (but see Beaudrot et al. (2013). It is possible that ponerines are ecologically more homogeneous e most species are predatory e while members of other subfamilies have more diverse foraging niches, diminishing interspecific competition and consequently species segregation. Unfortunately, the feeding niches of most ants are not sufficiently studied to allow further division into feeding guilds (Collins et al., 2011). Additional knowledge, such as guild membership of species, has revealed structure in communities that had seemed random before (Sanderson, 2004). However, even among ants, niche differentiation is not always sufficient to explain the coexistence of similar species (Andersen et al., 2013;Houadria et al., 2015).

Do levels of competition differ at different stages of recolonisation and at different heights?
Species diversity should be maximised at intermediate levels of succession, because under these conditions both competitive (Kselected) and opportunistic (r-selected) species can coexist (Connell, 1978). Our results are consistent with this hypothesis. At early stages of succession, interspecific competition is thought to be relatively unimportant. Accordingly, our community-level index, the ratio of significant species, and the C-score, all found competition to be lowest in ferns after just one month of recolonisation. After eight months, which represents an intermediate successional stage, we observed the greatest levels of community structure, in terms of significant aggregation and the highest number of nonrandom species interactions. However, pristine communities were randomly structured. In our tentative interpretation, competition (which leads to non-random structures) is highest at intermediate successional stages, where colonising species compete for nest space, while pristine ferns are mainly inhabited by species that show little competitive exclusion.
In a parallel manner, the understorey communities showed nonrandom structure, while those in the canopy were stochastic. This may be due to habitat filtering, where higher solar radiation, stronger winds, and stronger fluctuations in humidity (Nadkarni, 1994;Parker, 1995) should result in a stronger desiccation stress in the canopy. Here, physical conditions winnow certain species, thus reducing overall levels of interspecific competition and the impact of biotic interactions (Lepori and Malmqvist, 2009;Luiselli, 2006). Note that despite the lower community structure in the canopy, species numbers per fern did not differ between canopy and understorey ferns.

Implications for the analysis of co-occurrence patterns in community ecology
We have outlined a statistical approach for the analysis of ecological communities which allows a detailed analysis of species co-occurrence patterns. By analysing the associations between each and every species, we can detect positive associations and mutual exclusion, and obtain a more detailed picture than metrics such as the C-score Roberts, 1990, 1992) or checkerboard units (Diamond, 1975;Gotelli and McCabe, 2002), although there are other powerful approaches (Gotelli and Ulrich, 2010). Our approach may be particularly useful to search for specialised, pair-wise associations that warrant further study. Such pair-wise associations can indicate mutual tolerance, with a dominant and a submissive species (Dejean and Corbara, 2003;Majer, 1976Majer, , 1993Majer et al., 1994), or parasitic or mutualistic association (Menzel and Blüthgen, 2010;Menzel et al., 2010aMenzel et al., , 2010bOrivel et al., 1997). In our dataset, one Polyrhachis and two Pheidole species always co-occurred with the same Diacamma species, suggesting a close relationship between them and Diacamma. Such intriguing associations have been shown before for other members of these genera (Polyrhachis: social parasitism; Pheidole: cleptobiosis; (Kaufmann et al., 2003;Maschwitz et al., 2000), which underpins the biological relevance of our results.
Generating large numbers of P values with regard to species or species pair levels inevitably increases type I error. This does not affect our statements about proportions of deviant species, but it may affect statements regarding the significance of specific associations. In our study, the Diacamma-Polyrhachis association remained significant after correction for multiple testing, but the others did not. Correction over such a high number of P values may inflate type II errors, making it more difficult to identify interesting associations: when strictly applying these corrections, few ecological datasets would be large enough to provide the statistical power to detect associations between less common species. For example, the positive association of the Diacamma and a Pheidole species (P spp-seg ¼ 0.00029) did not withstand correction, and even higher statistical power is required to detect negative associations e.g. between competing species. Such problems of statistical power are typical for multispecies ant mosaics and increase with the number, and rarity, of species considered (Blüthgen and Stork, 2007) (Appendix A2.1). We therefore recommend that uncorrected results on the species and on the species-pair levels should be viewed as a filter to detect potentially interesting associations, rather than as strict hypothesis testing.
In conclusion, our analysis revealed patterns that would remain undetected by standard co-occurrence metrics, which usually use average levels of co-occurrence across pairs of species. This approach may illuminate interesting and unexpected patterns when applied to other ecological datasets. The strength of our method is that it allows to test for non-randomness in cooccurrence for each species pair, and for the co-occurrence of each species with any other one. Moreover, one can analyse data subsets to detect compartments where biotic interactions are particularly intense e be they certain microhabitats, or subsets of species. For example, species segregation was found for larger species, although this pattern was concealed in the analysis of the total dataset. In our opinion, two more features of our method are useful and go beyond previous, valuable approaches to measure species-co-occurrence (Collins et al., 2011;Gotelli and Ulrich, 2010). First, the 'dilution' and, thus, masking, of patterns caused by strongly interacting species in a community with few interacting species is not a problem for our index since more weakly interacting species can still be detected via the proportion of non-random species or species pairs. Second, the species level analysis of our approach enables the assessment of rarer species that interact sparsely, but with many different species, and thus would not reach sufficient statistical power at species pair level.
Recently, the importance of functional traits for community assembly and species co-occurrence has been increasingly acknowledged (McGill et al., 2006). Although our method cannot specifically detect the importance of such traits, or habitat filtering according to traits, it can be used to analyse the role of trait similarity for species interactions. Firstly, trait differences can be calculated separately and then related to pair-wise co-occurrence measures (Kraft and Ackerly, 2010;Kraft et al., 2008), testing predictions about specific species pairs. Secondly, species can be grouped according to functional traits, and quantitative cooccurrence (i.e. co-occurrence of species with similar traits) can be analysed. This approach is analogous to our quantitative analysis of co-occurrence within subfamilies. It enables detection of whether species with certain traits are overdispersed or clumped. This way, niche overlap can be related directly to co-occurrence (Fowler et al., 2014); and trait clumping can be interpreted as evidence of habitat filtering (Kraft et al., 2015). Ultimately, our new statistical method could help to explain the way in which interspecific, pairwise interactions structure ecological communities.

Statement of authorship
MDFE designed research and performed experiments; NB & FM designed analytical tools; FM implemented analytical tools and analysed the data; FM & MDFE wrote the paper; TMF identified ants; all authors contributed to data interpretation and manuscript revision.