NicheDiv: A DAPC framework to quantify niche divergence across highly multivariate environmental space
Daniel SchönbergeriD, Zachary G. MacDonaldiD, B Christian Schmidt, Julian R. DupuisiD
Abstract
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.
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 0
- Research Focus
- Approach
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- A unifying framework for quantifying and comparing n-dimensional hypervolumes
- There and Back to the Present: An Evolutionary Tale on Biological Diversity
L. Duarte, G. Nakamura, … J. A. F. Diniz-Filho·bioRxiv·Dec 11, 2021
- Is niche divergence more likely in parapatry? A test in Sclerurus mexicanus sensu lato (Aves: Furnariidae)
J. C. Cooper, D. Barragan Diaz·bioRxiv·Dec 6, 2022
- Tracking niche change through time: simultaneous inference of ecological niche evolution and estimation of contemporary niches
X. Hua, M. Cardillo, L. Bromham·bioRxiv·Dec 29, 2019
- Decomposing the causes for niche differentiation between species using hypervolumes
J. C. Carvalho, P. Cardoso·bioRxiv·Dec 4, 2018
- ENVIREM: An expanded set of bioclimatic and topographic variables increases flexibility and improves performance of ecological niche modeling
Pascal O Title, Jordan B Bemmels·bioRxiv·Sep 14, 2016