DOI: 10.5061/dryad.59zw3r2fn
title: Rates of species turnover across elevation vary with vertical stratum in rainforest ant assemblages

description: Climatic variation at local scales can influence both exposure and
 sensitivity of organisms and thereby scale up to influence population
 persistence and community composition across broader geographic extents.
 Tropical forest canopies are more climatically dynamic than the
 understorey. Consequently, the niche space of forest canopies has higher
 overlap in thermal conditions along elevation gradients, which imposes
 less of a climatic barrier to arboreal species than their ground-dwelling
 counterparts. We use ant communities of the Australian Wet Tropics to test
 the prediction that ground communities should have higher rates of species
 turnover over elevation compared to arboreal communities. We sampled
 ground and arboreal ants along elevation gradients at a bioregional scale
 that includes four mountain sub-regions. We assessed community composition
 at three spatial resolutions (regional, elevation, vertical) and then
 calculated beta diversity (species turnover) over elevation for ground and
 arboreal communities using null modelling procedures to compare
 different-sized species pools. Vertical niche affinity was a strong
 contributor to overall biogeographic patterns; indicated by a strong
 interaction between vertical niche and elevation in beta diversity models.
 On average, the ground community exhibited a pronounced elevational
 distance-decay pattern while the arboreal community showed no pattern.
 Mean species turnover was 36% higher in ground than arboreal communities.
 Our findings suggest that the vertical niche has a pronounced effect on
 biogeographic patterns which has important implications for understanding
 the role of local scale climate conditions in shaping communities and for
 potential responses to future climate change.
description: Ants were sampled at 15 elevation sites at four mountain
 sub-regions in the Australian Wet Tropics Bioregion. Ants were collected
 using tuna baits with 5 vials placed every three metres in vertical height
 from the ground to the canopy at mutliple trees per site. Survey height
 varied between 15–27m. 
 <strong>Leahy_etal_WFCA_Ant_Data.csv</strong> The main data file. A site by species matrix. Cells show counts of individuals of each species per vial. This file is read in to the three R scripts in the folder. <strong>Leahy_etal_beta_div.csv</strong> The file produced from the R script "Leahy_etal_Ant_Beta_Diversity.R" that is read in for the models R script, "Leahy_etal_Models"
description: # Rates of species turnover across elevation vary with vertical stratum in
 rainforest ant assemblages 
 The folder **Leahy_etal_DataS1** contains the data and R scripts for the
 article. All material is free to use, but we would appreciate being
 informed by email if the data is used and this dataset and article cited
 if appropriate. Questions or comments can be addressed to Lily Leahy:
 [l.leahy@latrobe.edu.au](mailto:l.leahy@latrobe.e) ## Description of the
 data and file structure File list (files found within DataS1.zip) *
 Leahy_etal_WFCA_Ant_Data.csv * Leahy_etal_beta_div.csv *
 Leahy_etal_Ant_Species_Composition.R * Leahy_etal_Ant_Beta_Diversity.R *
 Leahy_etal_Models.R Description of files and workflow Have all files in
 the same folder and set R working directory to this folder.
 **Leahy_etal_WFCA_Ant_Data.csv** Main survey collections data in a site by
 species matrix showing all data for all sites surveyed.  Tuna baited vials
 were placed every three metres from ground to canopy in trees at 15
 elevation sites at four subregion mountain ranges of the Australian Wet
 Tropics Bioregion. Cells of site by species matrix are counts of each
 species per vial, note downstream analyses use species occurrence. Note,
 the data file includes empty vials that lacked ants. *mtn* = Mountain
 Subregion (Atherton = AU, Carbine = CU, Windsor = WU, Finnegan = FU),
 *ele* = Elevation m asl, *tree* = survey tree number (1-5), *height* =
 vertical survey height (0 = ground, 3-27m = arboreal), *vial* = baited
 vial number/code. **Leahy_etal_beta_div.csv** This data is produced in the
 R script Leahy_etal_Ant_Beta_Diversity.R and used for modelling in the R
 script Leahy_etal_Models.R. *mtn* = mountain subregion as above, *niche* =
 vertical niche (ground, arboreal), *pairwise* = the pairwise site numbers,
 (e.g. AU 2_1 represents Atherton site 400m asl compared to Atherton site
 200m asl), *dist* = elevational distance between two sites. *sim, sne,
 sor* = observed beta diversity metrics. *SESsim, SESsne, SESsor* = null
 model beta diversity metrics. **Leahy_etal_Ant_Species_Composition.R** R
 file for analysis of species composition patterns across sub-region,
 elevation, and vertical height. Read in Leahy_etal_WFCA_Ant_Data.csv.
 Script includes: data wrangling to get into correct format, nMDS, checking
 of multivariate dispersion, PERMANOVA model, production of nMDS figures.
 **Leahy_etal_Ant_Beta_Diversity.R** R file for analysis of beta diversity
 (species turnover) within each sub-region amongst elevation sites. Read in
 Leahy_etal_WFCA_Ant_Data.csv. Species are allocated to ground or arboreal
 assemblage based on frequency of occurrence. Beta diversity is analysed
 separately for ground and arboreal assemblages. Analysis of beta diversity
 implements package BETAPART ver. 1.5.2. Note, all three metrics *Bsim,
 Bsne, Bsor,* are calculated but only *Bsim*, which represents species
 turnover, is used in downstream analyses and models. Null modelling
 procedure and observed beta diversity metrics calculated calculated in a
 for loop for each subregion and vertical assemblage and then collated at
 the end. Writes a csv file titled: Leahy_etal_beta_div.csv This file is
 read in for use in the next R script Leahy_etal_Models.R. Can run this
 script and save the resulting csv or can use the csv
 Leahy_etal_beta_div.csv already in the folder. **Leahy_etal_Models.R** R
 file for generalised linear models and analysis of elevational distance
 decay. Read in Leahy_etal_WFCA_Ant_Data.csv and Leahy_etal_beta_div.csv.
 *Bsim* metric of beta diversity (species turnover) is modelled as a
 function of the interaction between vertical assemblage and elevational
 distance with a glm model. Pseudo P-values are calculated using a Monte
 Carlo simulation. Wilcoxon rank sum tests are performed to analyse the
 difference in mean *Bsim* of ground versus arboreal assemblages. Figures
 from model outputs. ## Sharing/Access information Data were also used in
 the article: Leahy et al. 2021 Vertical niche and elevation range size in
 tropical ants: implications for climate resilience. Diversity and
 Distributions 27: 485-496 That data is stored in the Dryad repository
 below: *
 ##
 Code/Software All code are R files. Packages and code were originally run
 with early release version of R and tested to run with up to R version
 4.1.1. Citations and versions for relevant R packages in the text of the
 article.