Premium accounts now available! Sign up and create a premium account. Read more Close

Advertisement

Image

NicheDiv: A DAPC framework to quantify niche divergence across highly multivariate environmental space

Preprint Created on 22 Jun 2026 bioRxiv

Quantifying niche divergence is crucial to understanding the ecological and evolutionary processes underlying range limits, coexistence, speciation, biogeography, and macroevolution. Yet available approaches rely on low-dimensional climate summaries, are vulnerable to multiple biases, or struggle with high-dimensional collinear data. We introduce the R package NicheDiv, which adapts discriminant analysis of principal components (DAPC) to quantify pairwise niche divergence across any number of abiotic and biotic environmental variables associated with occurrence records. Our method first addresses correlations among environmental variables through principal component analysis. It then identifies a single discriminant axis that maximizes separation between predefined groups (species/lineages/populations), summarizing multivariate niche structure into one dimension. Significance is assessed by a permutation test that reshuffles group identities to mimic a shared niche. To characterize ecological differentiation, NicheDiv calculates Schoeners D as an overlap index and extends the niche divergence plane to multivariate space, providing metrics such as niche dissimilarity and exclusivity. Extracted variable contributions from the discriminant axis identify environmental variables that contribute most to divergence. Using simulations and empirical data together with a large set of environmental layers, we demonstrate that NicheDiv is computationally scalable, detects subtle divergence in high-dimensional space despite multicollinearity, distinguishes different forms of niche divergence (weighted, nested, soft, hard), and identifies the variables that potentially drive divergence. Compared with alternative divergence tests (PCA-env, hypervolumes, MVNH, PERMANOVA, PCA-space, and logistic regression), NicheDiv generally retains more variation, scales more consistently with increasing divergence, and returns more interpretable effect sizes. NicheDiv automatically extracts such environmental data from preconfigured and user-supplied GIS layers and implements a preprocessing pipeline that reduces known biases: delimiting accessible background space, spatially thinning occurrences, balancing sample sizes, filtering low-information variables, and screening predictors for between-group environmental analogy. We test our framework with empirical analyses of Hemileuca buck moths and demonstrate that their niches are structured by a range of seasonal abiotic and biotic variables rather than annual climatic averages. Overall, NicheDiv offers a robust framework for characterizing niche divergence across multiple environmental axes in support of species delimitation, local adaptation, community ecology, biogeography, and macroevolution.

Schoenberger, D., MacDonald, Z. G., Schmidt, B. C., Dupuis, J. R.

Advertisement

Stats

  • Recommendations n/a n/a positive of 0 vote(s)
  • Views 0
  • Comments 0

Recommended by

  • No recommendations yet.

Post a comment

You need to be signed in to post comments. You can sign in here.

Comments

There are no comments yet.

Advertisement