*2.5. Statistical Analysis*

We applied generalized additive mixed models (GAMMs) with the "gamm" function of the "mgcv" R package [42], predicting the species richness and the functional diversity (functional richness and Rao's quadratic entropy separately) of amphibians, reptiles, and mammals as a function of the climatic predictors and those related to human pressures. Specifically, we built three models for each diversity metric: (a) a climatic model that included only climatic variables, (b) a land–human model including land-use-related variables and human population density, and (c) an overall model including all the predictors. We used Poisson error distribution for species richness and Gaussian error distribution for functional diversity indices. To account for spatial autocorrelation, we included the spatial correlation structure of coordinates (Gaussian distribution). All the predictors were modelled as smooth predictors with penalized thin plate regression splines, using three knots per spline. Prior to modelling, we checked for multicollinearity among variables by applying the variance inflation factor (VIF). Since all VIF values scored <10 [43], we included all variables in the model. Total precipitation and precipitation seasonality were square-root transformed and land-cover diversity, agricultural area extent, and human population density were log10 transformed prior to analysis to improve normality. Grid cells with less than 50% land-cover were excluded from the analysis.
