Model assumptions, model selection and other details.
We ensured normality and homoscedasticity of LMM residuals through residuals inspection and checked for overdispersion in GLMMs. In all models, we checked for residual spatial autocorrelation using Moran’s I test, implemented in package ncf (Bjørnstad, 2018). Random effects were used to deal with the temporal autocorrelation and the data’s nested design.
For the balance and niche models, we obtained pairwise comparisons between levels with the package emmeans (Lenth et al. 2018). We used the Akaike Information Criterion of second order (AICc) for model selection (Burnham, Anderson, & Huyvaert, 2011). From the global model of each response variable, we obtained the set of best models (ΔAICc ≤ 4) (Burnham et al. 2011). To avoid collinearity issues, the selected models were constrained to only contain explanatory variables with r ≤ |0.6| (Dormann et al., 2013), ensuring low variance inflation factor (VIF ≤ 4). We adopted a multimodel inference approach, by averaging the coefficients of the selected models and using these conditional averaged coefficients as final results (Burnham et al., 2011). The relative importance of the predictor variables was not considered because some variables were not contained in the same number of models due to collinearity issues, which could bias the sum of Akaike weights (Burnham et al., 2011).
We used packages lme4 (Bates et al., 2015) to fit the (G)LMMs,lmerTest to calculate denominator degrees of freedom andMuMIn (Bartón, 2018) for model selection, model averaging and to obtain the marginal R² (variance explained by the fixed effects) (Nakagawa & Schielzeth, 2013).
RESULTS