Data and code for: "Symmetries in Montane Species Abundance Profiles Elucidate the Link between Environment and Abundance"
收藏资源简介:
Description of the data and file structure Files and variables File: ProcB_environ-abundance_alldata.xlsx Description: The datafile contains 7 sheets. Details of specific column names are listed at the top of each sheet. 1\. [Raw_Abundance] [The elevational abundance profiles of the 62 species used in the analysis.] 2\. [A.SD] [Asymmetry derived using standard deviation] 3\. [A.No] [Asymmetry derived using number of records] 4\. [A.Pk] [Asymmetry derived using the shape near the peak] Each of the above sheets contain columns for species names, observed species values, and 400 simulated species values. 5\. [Spearman] [Spearman Rank Correlation between Asymmetry and Modal Elevation for observed species values, and 400 simulated species values.] 6\. [PGLMM] [α and β values for a Phylogenetically-corrected Bayesian Generalised Linear Mixed model for the relationship between Asymmetry and Modal Elevation for observed species values, and 400 simulated species values.] 7\. [Table-manuscript] [Appears as Table 1 in the manuscript and references quoted values to how they were derived from the previous sheets.] File: Elevational_Profile_Counts_Raw.csv Description: The datafile that contains the elevational abundance profiles used as direct input to the R pipeline. Identical to Sheet 1 of ProcB_environ-abundance_alldata.xlsx. File: Lookup_Dynamic_Profile_Smoothing_brackets_Ref.csv Description: The smoothing factor (f) multiplied to profile SD to determine the smoothing window. pp100 and pp60 were used to determine the modal elevation and the region around the peak comprising the inner 68% of the abundance profile. File: Lookup_Res50_SimlProf_Smoothing_Correction_Ref.csv Description: A look-up table to correct for the impact of smoothing on profile asymmetry based on the smoothing factor utilised. Code/software: 00_all_custom_functions.R Description: All the custom R functions that were utilised in the analyses Code/software: 01_profile_estimation_pipeline.R Description: Wrapper function that utilises the custom functions to estimate parameters for individual abundance profiles, crucially asymmetry and modal elevation. Code/software: 02_Monte-Carlo_simulations.R Description: Wrapper function that utilises the custom functions to generate Monte-Carlo simulated profiles for error estimation. Code/software: 03_arguments_and_function_call.R Description: The output is a file named Elevational_profile_stats.csv, with all profile parameter estimates across all Monte-Carlo iterations. The estimates relevant to our analyses have been listed in Sheets 2-4 of ProcB_environ-abundance_alldata.xlsx. Note that the estimates are based on simulations and may differ slightly on replication. Code/software: 04_Bayesian_PGLMM.R Description: Implements a Bayesian PGLMM to analyse the relationship between modal elevation and the asymmetry metric A.XX (A.SD, A.No, or A.Pk , as specified by the user). The output is a file named Mode.XVar_A.XX_Bayesian_PGLMM.csv, which lists intercept (α), slope (β), and phylogenetic signal (λ) estimates for the relationship across all species for each iteration. To reproduce the analyses, download all the files and ensure that they are in the same directory. Ensure that all the required libraries are installed, and then Run scripts in the following order: 00_all_custom_functions.R (load functions) 03_arguments_and_function_call.R (run profile estimation) 04_Bayesian_PGLMM.R (run PGLMM) R PACKAGES 400 profiles were simulated for each species using the negative binomial random number generator (Lindén and Mäntyniemi 2011; rnbinom in R; R Core Team 2021). The PGLMM was implemented using the brms package (Bürkner, 2017) and the clootl package (McTavish et al., 2025) to obtain a pruned tree used to estimate phylogenetic relatedness. All analyses were performed using custom scripts written in the R computing platform. REFERENCES 1. Lindén, Andreas, and Samu Mäntyniemi. 2011. “Using the Negative Binomial Distribution to Model Overdispersion in Ecological Count Data.” Ecology 92 (7): 1414–21. https://doi.org/10.1890/10-1831.1. 2. R Core Team. 2021. “R: A Language and Environment for Statistical Computing.” Vienna, Austria: R Foundation for Statistical Computing. https://www.r-project.org/. 3. Bürkner, P.-C. (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80, 1–28. https://doi.org/10.18637/jss.v080.i01. 4. McTavish, E. J., Gerbracht, J. A., Holder, M. T., Iliff, M. J., Lepage, D., Rasmussen, P. C., Redelings, B. D., Sánchez Reyes, L. L., & Miller, E. T. (2025). A complete and dynamic tree of birds. Proceedings of the National Academy of Sciences, 122(18), e2409658122. https://doi.org/10.1073/pnas.2409658122



