Modelling network metrics in relation to environmental gradients
We performed four separate analyses using H2’, H2’ z-score, dsi*ants, and dsi*plants as response variables, the environmental predictors as fixed effects (latitude, elevation, and anthropogenic disturbance), and study identity as a random effect (full model in supplementary, appendix 4 & 5). Linear mixed effects models (lmer function in the lme4 package) were used to predict changes in H2’ and H2’ z-score, fitted using maximal log-likelihood (REML = F) in order to compare models with different fixed effects. Generalized linear mixed effects models with beta error distribution (glmmTMBfunction in the glmmTMB package) were used to predict dsi*ants, and dsi*plants, as dsi* varies between 0 and 1. Model selection was based on the corrected Akaike Information Criterion (AICc), calculated for the complete set of models using the dredge function in theMuMIn package. The global model included all main predictor variables and first order interactions between network type and each of the other three predictors. The model with the lowest AICc score was selected. For categorical predictor variables in the final model, to understand which factor levels differed significantly, we inspected test statistics and p-values for pairwise contrasts between levels, using therelevel function where necessary to explore all pairwise comparisons. Note that family level type 1 error rate is retained at 0.05 for these comparisons, so no further correction for multiple testing is required. This was also done for interactions involving categorical predictors. Lastly, because only foraging networks were present above 1500 m a.s.l. (Figure 3), we removed these four outliers in terms of predictor variables, and repeated our full analyses to explore whether these data were driving any of the patterns we observed. We found that the model from all response variable stayed the same but with higher AICc (see supplementary, appendix 6 & 7). Hence, for the remainder of the paper, we present the analysis of the full dataset.