Statistical Analysis
Collinearity between predictor variables (soil and habitat structure)
was accounted for by doing a principle component analysis of the two
sets of variables respectively. The first two axes of the PCA for soils
explained 66.55 % of the variation, the first axis 51.98 %, and the
second 14.57 %. PC1 was positively associated with more sandy soil and
negatively associated with clay soils (Figure S1). The first two axes of
the PCA for habitat structure explained 69.28 % of the variation, first
axis, 41.92, and the second 27.36 %. The first axis was positively
related to increased canopy cover, leaf litter, and more complex
structure.
These principle components were used to model gradients in ant diversity
in response to habitat structure and soil respectively. Two further
categorical variables, habitat (open vs closed) and season (hot-wet and
hot-dry) were also included. Species richness and effective number of
species for Shannon diversity and Simpson’s diversity (Jost, 2006) were
modelled using Generalized Linear Mixed Models (GLMM), with site as the
random factor and Poisson error distributions, a loglink function for
richness and Gaussian error distributions, and an identity link function
for Shannon and Simpson’s effective number of species. The best model
was identified using a Alkaike Information Criterion, the lowest being
the best. Models that were < Δ2AIC were also included. The
relative contribution of marginal (fixed,
R2m) and conditional (fixed and
random, R2c) in the variation
explained were calculated for each model (Nakagawa & Schielzeth, 2013).
Compositional variation was modelled using a model-based multivariate
approach where we fitted multivariate generalized linear models (GLMs)
to ant species abundance data in the R package “mvabund” (Wang,
Naumann, Wright, & Warton, 2012) . Predictors included were similar to
those included into the univariate GLMMs. This model-based approach
deals with confounding mean–variance relationships typical of count
data that are zero inflated (Warton, Thibaut, & Wang, 2017). Likelihood
ratio statistics for each taxon were summed, that results in a
community-level measure for each predictor. Correlation across species
was accounted for by using the PIT-residual bootstrap method to derive
p-values by resampling 999 rows of the data set (Warton et al., 2017).
Predictors were included in the model individually to explore the
marginal (variation explained by the predictor on its own) deviance
explained.
Model fit for both univariate and multivariate models were evaluated by
visually inspecting residual plots for deviations from normality,
heteroscedasticity, systematics patterns, and autocorrelation.
Ordination of ant assemblages was done using Bayesian ordination and
regression (Hui, 2016). To aid visualization, samples for the two
seasons were pooled.
Responses of ant assemblages to gradients in soil and habitat structure
were modelled using Threshold Indicator Taxa Analysis (TITAN) from the
“TITAN2” package (Baker & King, 2010). This method uses standardizedz -scores obtained from indicator species analysis (Indicator
Value) to detect the species-specific change points, and the direction
of response along a gradient (Baker & King, 2010; Costas, Pardo,
Mendez-Fernandez, Martinez-Madrid, & Rodriguez, 2018). Increasing
responses (z+) are distinguished from those decreasing (z- ) at a
specific change point (Baker & King, 2010). TITAN also estimates
indicator reliability and the proportion of times that a taxon is given
the same classification through bootstrapping, as well as uncertainty
around the location of individual taxa and community change points
(Baker & King, 2010).