2.4 Statistical analyses
We first tested the effect of four independent response variables
(landscape context [i.e., natural forest vs. plantations], trapping
method, temperature, and precipitation) on beetle community composition
using a Permutational Multivariate Analysis of Variance (PERMANOVA) as
implemented in the “vegan” R package (Oksanen et al., 2022). We then
used Non-metric Multidimensional Scaling (NMDS) to represent the
dissimilarity of beetle communities between natural forest and
plantation areas. Subsequently, we compared family richness between
natural forest and plantation areas, and between trapping methods, by
plotting rarefaction and extrapolation curves with the number of
collected individuals as a measure of sampling intensity (‘iNEXT’
package in R v.4.2.1; Hsieh et al., 2019). We used the asymptotic
estimators provided by iNEXT as a measure of the total family richness
(including unobserved families) in each sampling site.
The drivers of the diversity of beetle assemblages were explored with a
linear model using the “lm ” function in R (R Core Team 2022).
The model included the asymptotic estimates of richness obtained in each
sampling site as a dependent variable, and landscape context, trapping
methods, temperature, and precipitation as independent variables. The
same approach was used for Shannon and Simpson indices as estimates of
the diversity of beetle communities, again using asymptotic estimators
from iNEXT.
We used negative binomial regressions, fitted with the “glm.nb ”
function in the MASS R package (Venables & Ripley, 2002), to test the
effect of the same variables (landscape context, trapping methods,
temperature, and precipitation) on beetle abundances. Negative binomial
models were used because a Poisson Generalized Linear Model (GLM) that
we fitted first showed evidence of overdispersion, and the negative
binomial model had a lower AIC that the Poisson GLM. Here, we had to
account for the very variable sampling effort that produced the observed
variation in beetle abundances; therefore, models also included as an
offset the sum of the duration of sampling (the number of days) and the
number of traps. The same approach was used first for the total beetle
abundance, then for the most abundant beetle families separately:
Carabidae, Scarabaeidae, Nitidulidae, Curculionidae, and Chrysomelidae.
All statistical analyses were performed in the R platform (version
4.2.1, R development Core Team 2022).