DOI: 10.6084/m9.figshare.29143271
title: The program and results of Diversity Indices, Fractal <i>p</i>, and Model Fitting across Four Community Datasets (BDA, RCP, KA, and SO-RAD)

description: <b>Code Description</b><b>Code1. Pretreatment of BDA, RCP, KA, and SO-RAD Datasets</b>Raw community datasets from BDA, RCP, KA, and SO-RAD sources were preprocessed to standardize taxonomic resolution and abundance data. This step included the removal of incomplete records, normalization of abundance values, and filtering of samples with insufficient species data. The resulting standardized datasets form the basis for subsequent analyses.<b>Code2. Calculation of Fractal </b><b><i>p</i></b><b> and Fractal Model Fitting</b>The pretreated datasets were integrated into a unified data matrix. For each community sample, the fractal parameter (<i>p</i>) was calculated using rank–abundance distribution (RAD) fitting. A subset of samples was randomly selected to perform explicit model fitting using the fractal model, ensuring representativeness across different ecosystems and sampling protocols.<b>Code3. Statistical Distribution of Fractal </b><b><i>p</i></b><b> in KA and SO-RAD Datasets</b>The distribution of the fractal parameter <i>p</i> in the KA and SO-RAD datasets was analyzed using frequency histograms and kernel density plots. These visualizations characterize the ecological variability and model sensitivity of fractal <i>p</i> across distinct datasets.<b>Code4. Model Fitting and Goodness-of-Fit Evaluation</b>Six ecological rank–abundance models—Geometric Series (GS), Zipf, Zipf–Mandelbrot (ZM), Lognormal (LN), Broken Stick (BS), and Fractal model—were fitted to each sample in the standardized BDA, RCP, KA, SO-RAD datasets and the merged dataset. For each model, goodness-of-fit was evaluated using multiple statistical criteria, including Akaike Information Criterion (AIC), Bayesian Information Criterion (BIC), Kolmogorov–Smirnov test (K–S test), F-test, and Chi-squared test (χ²).<b>Code5. Model Comparison and Visualization of Winning Frequencies</b>The performance of each model was compared based on the number of samples for which it exhibited the best fit across different evaluation criteria. Summary statistics were visualized as bar charts to illustrate the relative support for each model under alternative goodness-of-fit frameworks.<b>Supplementary Tables</b><b>STable 1. Standardized Community Datasets After Pretreatment</b><br>This table presents the cleaned and standardized datasets obtained from the BDA, RCP, KA, and SO-RAD sources (see Code1). Each dataset includes community composition data with richness and abundance, ensuring consistency for comparative ecological modeling.<b>STable 2. Calculated Diversity Indices and Fractal </b><b><i>p</i></b>This table summarizes the ecological diversity metrics computed for each community sample, including:<b>Species richness (S)</b>: total number of species per sample<b>Shannon–Weaver diversity index (H')</b>: quantifies both richness and evenness<b>Simpson’s index (D)</b>: measures dominance/evenness within the community<b>Pielou’s evenness (J)</b>: standardized measure of evenness<b>Fractal </b><b><i>p</i></b><b> (</b><b><i>p_ls</i></b><b>)</b>: derived from fitting the fractal model to the sample’s rank–abundance distribution<b>Goodness-of-fit (R²)</b>: Coefficient of determination for the fractal model fit, indicating the proportion of variance in species abundance explained by the model.