Vertical niche and elevation range size in tropical ants: Implications for climate resilience

We propose that forest trees create a vertical dimension for ecological niche variation that generates different regimes of climatic exposure, which in turn drives species elevation distributions. We test this hypothesis by statistically modelling the vertical and elevation distributions and microclimate exposure of rainforest ants.


| INTRODUC TI ON
A key focus of biogeography has been to explain how and why environmental gradients, such as elevation and latitude, shape global biodiversity patterns (Addo-Bediako et al., 2000;Gaston, 2000).
Within forests, the architecture of trees adds a third environmental gradient with a strong climatic component that could also drive biogeographic patterns (Ashton et al., 2016;Scheffers et al., 2013).
Forest species occupy different vertical layers, creating microgeographic patterns in biodiversity at the local or microscale (Oliveira & Scheffers, 2019;Sheldon et al., 2018). We pose the question: could the way animals utilize vertical forest structure influence species' distributional patterns at the landscape scale? We investigate this question by exploring the relationship between vertical niche and elevation range size distributions amongst ant species in a tropical forest bioregion. Understanding this relationship between microgeographic patterns in vertical niche use and macrogeographic species' distributions is important in the context of a changing climate (Williams et al., 2008). The association between vertical niche use and elevation range size could indicate potential adaptive responses of species to climate change, including capacity for shifting elevation distributions or vertical movement within the forest strata (Moritz & Agudo, 2013;Nadeau et al., 2017;Thuiller et al., 2005).
The ecological niche is a central concept for understanding the spatial structuring of biodiversity (Pulliam, 2000). The niche can be conceptualized as a multidimensional space whose axes collectively capture the potential resources a species can use and the environmental conditions under which they can persist (Hutchinson, 1957;Kearney & Porter, 2004). The niche breadth-range size hypothesis proposes that greater breadth along one or more niche axes should allow a species to occur under a greater range of local conditions and therefore be distributed over a larger geographic area (Kennedy et al., 2017;Slatyer et al., 2013). The complex structure of forests creates a vertical dimension of niche space, including a vertical climate gradient, and increases the diversity of food and nest resources (Blüthgen et al., 2003;Scheffers et al., 2013). As species gain access to the arboreal space, niche breadth should expand along several possible niche axes relating to climatic tolerance and food and nest resources (Kaspari et al., 2016). Species with greater vertical niche breadth should have broader distributions across geographic space than do vertically restricted species (Scheffers et al., 2017;Scheffers & Williams, 2018).
In tropical forests, the vertical climate gradient is ubiquitous and orders of magnitude steeper than climatic gradients associated with elevation or latitude (Scheffers et al., 2013). As such, vertical niche breadth should have a strong association with climatic tolerance (Kaspari et al., 2015). Importantly, not only does the mean temperature change from ground to canopy but temperature variability increases as well-canopy species are exposed to higher temperature variability than those living on the ground (Scheffers & Williams, 2018). Thermal adaptation to these microhabitats should result in broad thermal tolerance for arboreal species, and subsequently a broader elevation/geographic distribution, and narrow thermal tolerance for ground species resulting in a more restricted distribution (Calosi et al., 2010;Kaspari et al., 2015;Pintanel et al., 2019). This proposed mechanism is captured by the climate variability hypothesis, which proposes that species exposed to variable climates evolve generalized thermal physiology, allowing those species to traverse climatic gradients along latitude and elevation, F I G U R E 1 Schematic representation of key hypothesis that the microgeographic vertical climate gradient could influence macrogeographic patterns of ant species distribution across elevation. Trees represent a vertical dimension of temperature variance that ant species will be differentially exposed to depending on their vertical foraging niche breadth. We hypothesize that vertical niche breadth will predict elevation range size.
At the microgeographic scale, broad vertical niche breadth exposes species to a greater range of temperatures and higher temperature variance.
Broad vertical niche breadth species should tolerate greater temperature change across the elevation gradient and therefore achieve broader elevation range size at the macrogeographic scale. Narrow resulting in a wider geographic distribution than thermal specialists from stable climates (Addo-Bediako et al., 2000;Calosi et al., 2010;Janzen, 1967;Pintor et al., 2015).
Here, we test the hypothesis that vertical niche use is positively associated with elevation range and propose exposure to temperature variance as the key underlying mechanism. We test this relationship using the rainforest ant fauna of the Australian Wet Tropics Bioregion. Ants are an excellent study system for testing scaling rules in biogeography as they fill multiple niches in the rainforest environment and occupy space along both vertical and elevation gradients (Blüthgen et al., 2003;Longino et al., 2019).
Ant distribution is strongly related to temperature-temperature requirements for brood development and adult foraging success are both important drivers of ant distributions (Kipyatkov & Lopatina, 2015;Penick et al., 2017). Here, we focus on foraging niche breadth of adult workers rather than the nest sites of colonies. The persistence of a colony at a site will be contingent on both nest success and foraging success but nests can be buffered from external temperature variation, through either nest construction (Jones & Oldroyd, 2006) or social thermal regulation (Villalta et al., 2020), whereas foragers must cope with thermal extremes (Jayatilaka et al., 2011).
The framework for our study is represented in Figure 1 along the vertical gradient as an explanatory mechanism for elevation range patterns.
In our models, we focus on a subset of factors that we have measured and expect to influence elevation range size. We expect that our measured variables (vertical niche breadth and temperature variance exposure) will impose a limit on species' elevation ranges, creating an upper bound which species cannot exceed. Species will also fall below this upper bound, not reaching their potential elevation range due to unmeasured factors not included in the model, such as interspecific competition (Cade et al., 1999;Machac et al., 2011;Thomson et al., 1996). Such a relationship is expressed as a wedgeshape distribution of points that is bounded by an upper limit (Cade et al., 1999;VanDerWal et al., 2009), and we are interested in modelling the slope of this upper limit as well as the mean value. We use quantile regression to model these portions of the response distribution, and we expect a stronger rate of change in elevation range size with our explanatory variables at the upper bound of the response distribution than at the mean of the response distribution (Cade & Noon, 2003). Finally, we discuss the importance of vertical niche characteristics and elevation distributional patterns in the context of tropical forest species and climate change.

| Study sites
This study was conducted across the Australian Wet Tropics (AWT) Bioregion, Queensland, at long-term monitoring sites (Williams et al., 1995(Williams et al., , 2010

| Sampling
At each elevation site per sub-region, we sampled an average of 4 trees per site, and at six sites, 5 trees were sampled (see Table S1.1, Appendix S1). Trees were sampled using bait traps comprised of plastic vials (1 cm in diameter, 5 cm in length) containing canned tuna in oil, attached to the tree. At each tree, 5 bait traps were set on the ground and every three metres above ground level up to the maximum accessible height of the tree. Survey height ranged from 15 to 27 m, depending on the height of the tree and accessibility (Table S1.1, Appendix S1). Traps were set in the morning and collected 2-3 hr later.
This design does not sample cryptic ant fauna in the leaf litter and results in a bias for dominant ant species that recruit large numbers to baits (Agosti et al., 2000). We deemed this an acceptable limitation to the study design, as the primary aim was to document relative patterns for ant species along environmental gradients rather than to document total community diversity. The canopy was accessed using

| Microclimate monitoring
We recorded microclimate temperature across the vertical and elevation gradients at the Atherton Uplands. Thermochron data loggers were deployed to record temperature for 43 days in the wet season from December 2017 to January 2018 at Atherton Uplands. A thermochron data logger was placed every 3 m in height from ground to the highest point of the tree at one tree per elevation site along the Atherton Uplands gradient. Thermochrons were shielded from sun exposure and rain, and recorded temperature every 30 min.
Temperatures recorded between daytime hours of 08:00 and 17:00 hr, matching the time of our ant sampling, were used in analyses to quantify mean temperature and temperature variance along vertical and elevation gradients, and to derive an exposure to temperature variance value for each species based on that species' occurrence along vertical and elevation gradients.

| Quantifying temperature change along vertical and elevation gradients
We quantified the change in mean temperature and temperature variance along vertical and elevation gradients using linear regression models. We derived two climate models using linear regression: mean temperature as a function of vertical height and elevation, and temperature variance as a function of vertical height and elevation.

| Exploring patterns of vertical niche foraging
We wished to explore how ant species use the vertical gradient for foraging. We classed species into three vertical niche positions using an arboreal score based on their occurrence in tree or ground vials. This was calculated as the proportion of arboreal vials occupied divided by the proportion of vials occupied in total (i.e., arboreal plus ground). Ant species with arboreal scores of <10% were classified as ground-dwelling, between 10% and 90% semi-arboreal, and >90% arboreal. We visualized niche position in relation to vertical niche breadth and the modal value of vertical height (subsequently referred to vertical height mode) using violin plots.

| Relationship between vertical niche breadth and elevation range size
Our first aim was to examine the association between vertical niche breadth and elevation range size. We defined vertical niche breadth as the minimum to maximum vertical height of a species recorded across the study area and elevation range as the difference between the minimum and maximum elevation point of the species across the study area. Single records of species are problematic in distributional studies because it is difficult to determine whether these species are genuinely geographically rare or simply have a low probability of detection (Coddington et al., 2009;Longino & Colwell, 1997). We therefore considered only 55 species found at two or more trees.
We were interested to know whether the relationship between vertical niche breadth and elevation range size varies amongst genera with very different ecological traits (including body size), and so we also ran separate models for the most species-rich genera Pheidole (Myrmicinae; 19 species) and Anonychomyrma (Dolichoderinae; 9 species).
2.4.4 | Relationship between exposure to temperature variability and elevation range size Our second aim was to test whether exposure to temperature variability along the vertical gradient could be an underlying mechanism influencing elevation range. Species with wide elevation ranges will inevitably be exposed to greater temperature ranges, leading to a positive relationship between a species overall temperature range and its' elevation range (Pintor et al., 2015). However, our hypothesis was that a species ability to cope with temperature variability at a given point in its range-due to its vertical niche-should influence that species capacity to distribute over elevation. As such, we derived a

| Testing for sampling artefacts and confounding factors
We took into account a potentially confounding effect of a positive abundance-range size relationship as an artefact of common species being sampled at more sites (Gaston et al., 1997), which could still be the case after removing singletons from the study. We included a measure of local abundance for each ant species as a covariate in our vertical niche breadth-range size model and exposure to temperature variance-range size model. Abundance was calculated as the mean proportion of trees occupied at sites where that species was present.
We considered that ant body size could influence an ant's ability to forage over greater distances and therefore play a role in determining vertical niche breadth and range size. As well, body size can alter an ant's thermal exposure-larger ants walk slightly higher above the surface boundary layer and therefore experience cooler operative temperatures than small ants (Kaspari et al., 2015). We had body mass measurements for 22 of our study species from a separate thermal tolerance project in the Carbine Uplands (L. Leahy, unpublished data), and in preliminary analyses, we modelled elevation range size as a function of body mass and then modelled vertical niche breadth as a function of body mass as separate models using only these 22 species (see Table S1.2, Appendix S1 in supporting information). Body mass did not have a significant effect on either elevation range size or vertical niche breadth for these 22 species (Table S1.2, Appendix S1) and was therefore not included in further analyses.
We ran several tests to explore how our sampling design may have affected our calculation of vertical niche breadth, exposure to temperature variance and elevation range size. We tested whether differences in survey height of trees affected our calculation of vertical niche breadth and found a very weak relationship (Table S1.3, Appendix S1). Likewise, differences in survey height of trees had a very weak relationship with exposure to temperature variance (Table   S1.3, Appendix S1). We investigated whether there was a consistent trend in tree height across elevation, as this could influence the relationship between vertical niche breadth and elevation range size (for survey tree heights see Table S1.1, Appendix S1) but found no trend in vertical tree height with elevation (Table S1.4, Appendix S1).
Finally, we tested whether differences in maximum elevation and total elevation range of each of the four mountains affected our calculation of elevation range size and found no substantial relationship (Table S1.5, Appendix S1).

| Statistical models
We used generalized linear models (GLM) with a gamma distribution and a log-link function to model the change in the mean of the response variable-elevation range-as a function of the predictors-vertical niche breadth and mean local abundance. In a separate model, we modelled elevation range as a function of exposure to temperature variation and mean local abundance. A gamma distribution with a log-link function was chosen because the response variable-elevation range-was positive and highly right skewed rather than following a Gaussian distribution. Predictor variables were scaled to obtain standardized beta coefficients, and we took the log of local abundance. Variance inflation was checked, and there was no evidence of collinearity between the covariates in either model. Each model was run with interactions between the covariates and as an additive model. Model performance was evaluated using Akaike information criterion (AIC c ) values (Table   S1.6, Appendix S1); the most parsimonious and best performing models are reported. To model the upper bound of the relationship between elevation range and the explanatory variables, we used quantile regression. Thus, we modelled two parts of the relationship: both the mean (0.5 quantile) and upper limit (0.9 quantile) for each model. Quantile regression was performed using the R package quantreg ver. 5.51 (Koenker, 2019); for more information on quantile regression, see Cade et al. (1999) and Cade and Noon (2003). To assess the performance of each model, including quantile regressions, we used a pseudo-R 2 measure that was estimated using equations of Nagelkerke (1991) and the package rcompanion ver. 2.3.0 (Mangiafico, 2019). This measure permits comparison of all regression models used, as it is not limited to simple linear regressions. All analyses were performed in R ver. 3.5.1 (http:// www.R-proje ct.org).  The average vertical niche breadth of arboreal specialists was 11.5 ± 1.3 m (Figure 3a), and they tended to be concentrated in the upper parts of the tree and canopy (vertical height mode averaged 14.0 ± 1.0 m; Figure 3b).

| RE SULTS
The vertical niche breadth model that included local abundance explained some variation in the elevational range of the ant species (GLM, pseudo-R 2 = .26; Table 1). Vertical niche breadth had a positive association with elevation range size, and the model predicted 1.5 times (95% CI: 1.25-1.75) increase in elevation range with every 3 m increase in vertical niche breadth (Table 1 and Figure 4). Local abundance had a weak but negative relationship with elevation TA B L E 1 Linear models for mean temperature and temperature variance across vertical tree height and elevation from temperature data loggers deployed in Atherton Uplands, Wet Tropics Bioregion, Australia. Generalized linear models (GLM) for elevation range as a function of vertical niche breadth and exposure to temperature variability as separate models, including local abundance as a covariate. Each model is presented for the mean (using GLM) and 0.9 quantile (using quantile regression) for 55 ant species surveyed across four mountains in the Wet Tropics Bioregion, Australia. Vertical niche breadth model also presented for the mean (GLM) as separate models for two of the common ant genera in the study area Pheidole (n = 19 species) of the Myrmicinae subfamily and Anonychomyrma (n = 9 species) of the Dolichoderine subfamily. For all models, coefficients and lower and upper 95% confidence intervals are presented and the Adjusted R 2 or Nagelkerke Pseudo R 2 range size (GLM, 0.76 times decrease, 95% CI: 0.64-0.92; Table 1 and Figure 5). At the 0.9 quantile of the relationship between vertical niche breadth and elevation range size (including local abundance as a covariate), more variation in elevation range size was explained than when we modelled the mean of the relationship (quantile regression, 0.9 quantile, pseudo-R 2 = .38; Table 1 and Figure 3). In Figure 4, the distribution of data points (species) is bounded by the upper limit (0.9 quantile) of species' elevation range with a large scatter of points below the upper limit, creating a wedge-shaped distribution of data points. The slope of the relationship between vertical niche breadth and elevation range at the 0.9 quantile was similar to the slope of the relationship at the mean; the model predicted a 1.32 times (95% CI: 1.2-1.81) increase in elevation range with every 3 m increase in vertical niche breadth (Table 1 and Figure 4). There was no relationship between local abundance and elevation range size at the 0.9 quantile (quantile regression, 0.96 times decrease, 95% CI: 0.6-1.06; Table 1). A similar pattern was found when the two dominant genera were considered as separate models; Pheidole (GLM, n = 19 species, pseudo-R 2 = .3, 1.44 times increase in elevation range for every 3 m increase in vertical niche breadth, 95%: 1.13-1.87) and Anonychomyrma (GLM, n = 9 species, pseudo-R 2 = .58, 1.95 times increase 95% CI: 1.3-2.8) both showed a positive association between vertical niche breadth and elevation range size but no relationship between local abundance and elevation range size ( Figure 4, Table 1).
There was a positive association between exposure to temperature variance (calculated from temperature sensors and each species' location records) and elevation range size; however, there was some variation left unexplained by the model. The mean model explained less variation in elevation range size compared with the 0.9 quantile model (GLM: pseudo-R 2 = .17 compared with 0.9 quantile model: pseudo-R 2 = 0.35; Table 1, Figure 6). For the mean model, there was 1.35 times (95% CI: 1.15-1.6) predicted increase in elevation range with increasing temperature variance exposure. The effect size was almost identical (1.34 times; 95% CI: 1.15-1.56) for the 0.9 quantile model. Notably, the eleven species with the greatest elevation range size (>800 m elevation range size) were all exposed to high degree of temperature variance ( Figure 6). In the exposure to temperature variance model, there was a very weak negative relationship between local abundance and elevation range at the mean of the relationship (0.83, 95% CI: 0.7-1.0) and no effect of F I G U R E 2 Temperature recorded every half hour over (a) elevation and (b) vertical height (in the tree) and mean temperature variance for period of deployment for (c) elevation and (d) vertical height from data loggers placed every three metres into trees at five elevation sites (200, 400, 600, 800, 1,000 m a.s.l.) and set to record temperature every half hour for 43 days at Atherton Uplands during Wet Season 2017-2018. All data from daytime hours between 08:00 and 17:00 hr. Box plots show the median (central band), 25th and 75th percentiles (bottom and top of boxes) and 1.5 times the interquartile range above or below the 25th and 75th percentiles (whiskers), and points show outliers above or below this local abundance on elevation range at the 0.9 quantile (0.99, 95% CI: 0.64-1.1) ( Table 1).

| D ISCUSS I ON
We found that ant species using more of the vertical tree space tend to have broader elevation ranges. Ant species with the broadest vertical niche foraged from the ground up to the high canopy, and vertical niche breadth was positively associated with elevation range. This pattern was consistent when considering all species (n = 55 species) and two contrasting genera (Pheidole and Anonychomyrma) separately. Local abundance was weakly and negatively correlated with elevation range size, a pattern that is not consistent with the widely reported positive abundance-range size relationship often found for vertebrate taxa (Gaston et al., 1997).
Arboreal species were exposed to far higher levels of climatic variation than were ground-restricted ants. There was support for the hypothesis that exposure to temperature variability influences the relationship between a species' vertical niche use and elevation range. Overall, our results suggest that the ecological flexibility to forage in ground and canopy habitats in combination with climate variability exposure are factors determining the capacity of species to occur across broader climatic and geographic gradients (Kennedy et al., 2017).
The differences in elevation range size were not explained by differences in species abundances, which is a commonly confounding factor (Brown, 1984;Gaston et al., 1997). Indeed, contrary to expectations we found a (weakly) negative association between local abundance and range size for ant species. One would expect that locally dominant and abundant ants would also be the most widespread over geographic space (Gaston et al., 1997), but we found the opposite pattern. Although small range size is often associated with being locally rare, the opposite can be true in locations where strong extinction filtering has occurred (Johnson, 1998). Species with restricted ranges can persist through high local abundance  (Table 1) with a gamma distribution and log-link function and 95% confidence intervals, and dotted line fitted from 0.9 quantile regression model (Table 1). Coloured circles show two common ant genera in the study area, blue = Pheidole (Subfamily: Myrmicinae, n = 19) and red = Anonychomyrma (Subfamily: Dolichoderinae, n = 9), black = all other genera [Colour figure can be viewed at wileyonlinelibrary.com] (Johnson, 1998). This appears to be the case for vertebrates in the Australian Wet Tropics Bioregion where repeated habitat contractions have filtered species assemblages leading to a negative relationship between local abundance and range size (Williams et al., 2006 (Andersen, 2008), dispersal ability (Scheffers et al., 2017) and the distribution of nest sites and food resources (Yanoviak & Kaspari, 2000), also potentially influence exposure to climatic variance and therefore elevation range size.
Species varied widely in their use of the vertical gradient.
Semi-arboreal ant species had the greatest vertical niche breadth, whereas arboreal specialists were concentrated in the higher parts of the tree. The ability of semi-arboreal species to forage at multiple vertical layers allows them to exploit the full temperature gradient along with a potentially wider range of food resources (Yanoviak & Kaspari, 2000). Some of our arboreal specialists were restricted to specific microhabitats such as epiphytes, and so would be buffered from temperature variability, inhabiting a climatically stable environment similar to ground-restricted ants (Blüthgen et al., 2004;Scheffers et al., 2014). Others forage along branches and trunks and would be exposed to high climate variability (Blüthgen et al., 2004;Stark et al., 2017). Therefore, microclimate exposure will differ between species depending on both vertical niche and foraging microhabitat. Mammola et al. (2019) report a similar pattern in cave spiders: deep cave specialists were adapted to low climate variability and had narrow elevation ranges compared with non-specialized cave spiders that were exposed to more variable climates associated with cave openings.
We considered that body size could influence the ability of an ant to forage over the vertical gradient, yet for 22 of our study species we found no relationship between body mass and vertical niche breadth or body mass and elevation range size. The two most species-rich genera in the study are quite different in their morphology and ecology; the tiny Pheidole in our study had a mean body mass of 0.07 mg, compared with 0.24 mg for Anonychomyrma.
Yet both genera showed the same pattern to the total species model whereby broad vertical niche breadth was positively correlated with elevation range size. This indicates that there is a general ecological-and possibly climatic-advantage to behavioural flexibility along the microgeographic gradient, allowing species to become more widespread along the macrogeographic (elevation) gradient.
Many of the ant species recorded in our study area were highly restricted in either vertical niche breadth or elevation range.
Species with a narrow niche breadth and distribution could be vulnerable to climate change due to the synergistic effects of restricted elevation range size, sensitivity to climate variation and limited ability to compensate behaviourally through vertical movement (Huey et al., 2009;Thuiller et al., 2005;Williams et al., 2008).
Semi-arboreal generalist species with a broader vertical niche and F I G U R E 5 Log of mean local abundance for ant species (n = 55) and elevation range extent (m) based on occurrence of ant species across elevation along four mountains in the Australian Wet Tropics. Lines fitted from the model (Table 1) with a gamma distribution and log-link function and 95% confidence intervals Log (Local abundance) Elevational range extent (m) F I G U R E 6 Exposure to temperature variability (°C) for ant species (n = 55) and elevation range extent (m), derived from temperature sensor deployment, and ant species vertical distributions from ground to canopy and occurrence across elevation along four mountains in the Australian Wet Tropics. Lines fitted from the model (Table 1) with a gamma distribution and loglink function and 95% confidence intervals, and dotted line fitted from 0.9 quantile regression model Exposure to temp. variance (ºC) Elevational range extent (m) elevation range have more options (Scheffers et al., 2017), having the capacity to shift their vertical position to compensate for broader scale shifts in the climate-environment or shift their geographic distribution further up the mountain as the lowland climate warms. Recent research found a positive correlation between verticality and resilience to climatic instability for several vertebrate taxa in the Australian Wet Tropics, where arboreal species dominated in areas with historically unstable climates (Scheffers et al., 2017). A similar pattern might be expected in tropical invertebrates, as species distribution and persistence in space and time are generally tightly coupled to climate and temperature (Bonebrake & Deutsch, 2012;Burwell & Nakamura, 2015;Davison & Chiba, 2008). The pattern for ants that we have presented here provides further support to the idea that arboreality is an important trait for assessing relative vulnerability to climate change in rainforest biomes (Scheffers & Williams, 2018). Arboreality may have provided species with the tools to overcome climatic instability in the past and could provide resilience to future climate change (Davison & Chiba, 2008;Nadeau et al., 2017;Scheffers et al., 2017;Thuiller et al., 2005). Our findings can be applied more broadly to vertically layered systems such as freshwater lakes (Kennedy et al., 2017), oceans (Hays et al., 2009) and caves (Mammola et al., 2019), where vertical niche is associated with climatic exposure and is therefore a potential mechanism driving macrogeographic patterns and resilience to climate change.

ACK N OWLED G EM ENTS
We thank Somayeh Nowrouzi and all the volunteers who contributed to fieldwork. This study was supported by multiple grants

CO N FLI C T S O F I NTE R E S T
The authors declare no conflict of interest.

PE E R R E V I E W
The peer review history for this article is available at https://publo ns.com/publo n/10.1111/ddi.13210.

DATA AVA I L A B I L I T Y S TAT E M E N T
Data for ant collections and microclimate are provided on the Dryad