Fig. 4: Environmental drivers of trophic diversity among functional groups.

a,b, Random forest analysis (a) and the pathways showing how environmental factors affect the trophic diversity via niche partitioning (trophic dissimilarity among taxa) and niche expansion (trophic diversity of taxa) as indicated by piecewise structural equation models (piecewiseSEM) (b). Variable importance in random forest models was evaluated using permutation test, with exact P values provided in Supplementary Table 9. In the piecewiseSEM, the conditional and marginal R2 that is, Rc2 and Rm2, respectively, represent the proportion of variance explained by the variables without and with accounting for random effects of site. Red and blue colours of the arrows indicate negative and positive relationships, respectively; only significant relationships are shown. Numbers adjacent to arrows are standardized path coefficients. Significance for individual paths were obtained from two-sides Wald tests of fixed effects in the corresponding LMMs: *P < 0.05, **P < 0.01, ***P < 0.001, with exact P values provided in Supplementary Table 10. The SEM adequately describes the data (P = 0.395, d.f. = 8, Fisher’s C = 8.40). Clay, soil clay fraction (%); litter C/N, litter carbon-to-nitrogen ratio; moisture, water content in soil (%); organic C, soil organic carbon (gC soil kg−1); PrecVar, precipitation variation of seasonality; TempVar, temperature variation of seasonality. Icons in b from Yan Zhang.