Spatial variables
We included spatial variables implemented as Moran’s eigenvector maps
(MEMs, Dray et al. 2006). We calculated MEMs based on the GPS
coordinates of the sampled host plants, with the assumption of positive
autocorrelation. We estimated the significance of individual
eigenvectors with a permutation test for the Moran’s I statistic and
included all the eigenvectors with Moran’s I >0.7, as well
as the last significant one, thus representing both coarse and fine
scale signal of significant spatial autocorrelation. We used the R
environment (R Core Team 2020) and packages ‘spdep’ and ‘adespatial’.