DOI: 10.5061/dryad.3r2280gv5
title: Data and code from: Effects of prescribed fire on plant α- and ꞵ-diversity and the regulating role of soil in a mesquite-oak savanna

description: This dataset supports spatial ecological analysis of plant diversity
 patterns in response to fire disturbance within a mesquite-oak savanna
 ecosystem. The dataset comprises 288 systematically collected quadrat
 samples (1-m²) stratified across three soil series types (TA: 120
 quadrats, VaB: 120 quadrats, KaB: 48 quadrats) with pre-fire
 (September-December 2018) and post-fire (September-December 2019) temporal
 comparisons. Each observation includes spatial coordinates, binary fire
 treatment status, and comprehensive diversity metrics encompassing three
 alpha diversity measures (Shannon diversity, species richness, and
 evenness) and six beta diversity indices, including both incidence-based
 measures (Sørensen dissimilarity and its turnover and nestedness
 components) and abundance-based measures (Bray-Curtis dissimilarity and
 its balanced variation and abundance gradient components).
description: # MSR Mantel Analysis for Mesquite-Oak Savanna Fire Diversity Study ##
 Overview based on the following RSTUDIO code script *
 **Fire_Diversity_MSR_Mantel_Results.R** This R script performs
 comprehensive spatial correlation analysis using Moran Spectral
 Randomization (MSR) Mantel tests to examine the relationships between
 plant diversity patterns and spatial/environmental factors in a
 mesquite-oak savanna fire study. The analysis evaluates how plant
 diversity responds to fire disturbance across different soil types and
 spatial scales. ## Study Background * **Study Area**: Mesquite-oak savanna
 ecosystem with stratified sampling design * **Sampling Design**: 288
 quadrats (1-m²) randomly located within the study area * **Sampling
 Period**: * Prefire: September-December 2018 * Postfire:
 September-December 2019 * **Stratification**: Sampling stratified by soil
 type and vegetation cover class ### Soil Series Distribution * **TA
 (Dominant)**: 120 quadrats * **VaB (Dominant)**: 120 quadrats * **KaB
 (Secondary)**: 48 quadrats ## Data Structure ### Input Files Required The
 script expects the following CSV files in the working directory: 1.
 **`MainDataset.csv`** - Main dataset containing all sites 2.
 **`Data_TA.csv`** - TA soil series subset 3. **`Data_VaB.csv`** - VaB soil
 series subset 4. **`Data_KaB.csv`** - KaB soil series subset ### Data
 Variables #### Spatial Variables * `Sampling_ID` - Unique identifier for
 each quadrat * `X_Coordinate` - Spatial X coordinate * `Y_Coordinate` -
 Spatial Y coordinate #### Treatment Variable * `Treatment` - Binary
 variable (0/1) indicating burn status * 0 = Unburned * 1 = Burned ####
 Alpha Diversity Metrics Calculated for both prefire and postfire periods:
 * **Shannon Diversity** * `Prefire_Shannon` - Shannon diversity index
 before fire * `Postfire_Shannon` - Shannon diversity index after fire *
 **Species Richness** * `Prefire_Richness` - Number of species before fire
 * `Postfire_Richness` - Number of species after fire * **Evenness** *
 `Prefire_Evenness` - Species evenness before fire * `Postfire_Evenness` -
 Species evenness after fire #### Beta Diversity Metrics Six β-diversity
 measures calculated for all pairs of sampling points: **Incidence-based
 measures:** * `Prefire_BSIM` / `Postfire_BSIM` - Sørensen turnover
 component (β.SIM) * `Prefire_BSNE` / `Postfire_BSNE` - Sørensen nestedness
 component (β.SNE) * `Prefire_BSOR` / `Postfire_BSOR` - Sørensen
 dissimilarity index (β.SOR) **Abundance-based measures:** * `Prefire_BBAL`
 / `Postfire_BBAL` - Balanced variation component (β.BAL) * `Prefire_BGRA`
 / `Postfire_BGRA` - Abundance gradient component (β.GRA) * `Prefire_BRAY`
 / `Postfire_BRAY` - Bray-Curtis dissimilarity (β.BRAY) ## Analysis Types
 ### 1. Simple Mantel Tests * **Diversity ~ Geography**: Tests spatial
 autocorrelation in diversity patterns * **Diversity ~ Treatment**: Tests
 treatment effects on diversity patterns ### 2. Cross Mantel Tests *
 **Prefire ~ Postfire**: Examines temporal consistency in diversity
 patterns ### 3. Partial Mantel Tests * **Diversity ~ Geography |
 Treatment**: Tests spatial patterns while controlling for treatment
 effects ## Required R Packages ```r install.packages(c("vegan",
 "adespatial", "ade4", "spdep",
 "dplyr", "ggplot2")) ``` * `vegan` - For Partial
 Mantel tests * `adespatial` - For MSR Mantel tests * `ade4` - For basic
 Mantel tests * `spdep` - For spatial neighborhood structures * `dplyr` -
 For data manipulation * `ggplot2` - For visualization ## Output Files ###
 Alpha Diversity Results * `MSR_Mantel_Prairie_Alpha_Main_Site_Results.csv`
 - Detailed results for main dataset *
 `MSR_Mantel_Prairie_Alpha_TA_Soil_Results.csv` - Results for TA soil
 series * `MSR_Mantel_Prairie_Alpha_VaB_Soil_Results.csv` - Results for VaB
 soil series * `MSR_Mantel_Prairie_Alpha_KaB_Soil_Results.csv` - Results
 for KaB soil series * `MSR_Mantel_Prairie_Alpha_All_Combined.csv` -
 Combined results from all datasets ### Beta Diversity Results *
 `MSR_Mantel_Prairie_Beta_Results.csv` - Beta diversity analysis (Main Site
 only) * `MSR_Mantel_Prairie_Beta_Summary.csv` - Beta diversity summary
 statistics ### Summary Statistics *
 `MSR_Mantel_Prairie_Alpha_[Dataset]_Summary.csv` - Summary statistics for
 each dataset ## Key Features ### Data Safety * Comprehensive error
 handling for file loading * Safe data preparation with NA replacement *
 Validation checks for required variables ### Spatial Analysis *
 Quantile-based distance thresholds for spatial weights * Automatic
 handling of isolated spatial points * K-nearest neighbors fallback for
 connectivity ### Statistical Rigor * 999 permutations for robust
 significance testing * Seed setting for reproducible results * Multiple
 comparison corrections available \##Explanation of the Warnings after
 running MSR## * These warnings indicate that the distance matrix contains
 zero distances, meaning that at least some pairs of observations have
 identical coordinates or values. * This can cause problems for analyses
 that require strictly positive distances. * However, we are dealing with
 sampling locations that may have similar values, so some small distances
 are expected ### Flexible Design * Handles missing datasets gracefully *
 Processes multiple soil series independently * Modular functions for easy
 modification ## Usage Instructions 1. **Set Working Directory**: Update
 the `setwd()` path to your data location 2. **Prepare Data**: Ensure all
 CSV files are in the correct format with required columns 3. **Run
 Script**: Execute the entire script or run sections stepwise 4. **Check
 Results**: Review output CSV files and console summaries ## Memory
 Management The script includes memory management features: * Initial
 memory clearing (`rm(list=ls())`) * Memory limit setting (100GB) * Garbage
 collection (`gc()`) ## Interpretation Guidelines ### Statistical
 Significance * `***` p ≤ 0.001 * `**` p ≤ 0.01 * `*` p ≤ 0.05 * `.` p ≤
 0.1 ### MSR Mantel R-statistic * Positive values indicate positive spatial
 correlation * Negative values indicate negative spatial correlation *
 Magnitude indicates strength of relationship ## Additional detail for
 abstract The dataset structure enables multiple analytical approaches
 including Moran Spectral Randomization (MSR) Mantel tests for spatial
 autocorrelation analysis, partial Mantel tests for controlling confounding
 variables, and temporal comparison studies examining fire effects on plant
 community structure. Data values include continuous spatial coordinates,
 binary treatment indicators (0=unburned, 1=burned), and standardized
 diversity indices calculated from species percent cover data. The
 dataset's reuse potentially extends to spatial ecological research,
 fire ecology studies, community ecology investigations, and methodological
 development in spatial statistical analysis, particularly for researchers
 examining disturbance effects on biodiversity patterns across
 heterogeneous landscapes. The accompanying R script provides a
 comprehensive analytical framework implementing MSR Mantel tests with
 robust error handling, automated spatial weight matrix generation, and
 production of results tables, making this dataset applicable for spatial
 ecological research and educational uses in landscape ecology and
 disturbance ecology. ## References ### Research Methods * Baselga, A.
 (2010). Partitioning the turnover and nestedness components of beta
 diversity. Global Ecology and Biogeography, 19(1), 134-143. * Baselga, A.
 (2013). Separating the two components of abundance‐based dissimilarity:
 balanced changes in abundance vs. abundance gradients. Methods in Ecology
 and Evolution, 4(6), 552-557. * Baselga, A., & Orme, C. D. L. (2012).
 betapart: an R package for the study of beta diversity. Methods in Ecology
 and Evolution, 3(5), 808-812. ### R Packages * Bivand, R., & Wong, D.
 W. S. (2018). Comparing implementations of global and local indicators of
 spatial association. TEST, 27(3), 716-748. [`spdep` package] * Dray, S.,
 Bauman, D., Blanchet, G., Borcard, D., Clappe, S., Guenard, G., Jombart,
 T., Larocque, G., Legendre, P., Madi, N., & Wagner, H. H. (2018).
 adespatial: Multivariate multiscale spatial analysis. R package version
 0.3-2.
 [https://CRAN.R-project.org/package=adespatial](https://CRAN.R-project.org/package=adespatial) * Dray, S., & Dufour, A. B. (2007). The ade4 package: implementing the duality diagram for ecologists. Journal of Statistical Software, 22(4), 1-20. [https://doi.org/10.18637/jss.v022.i04](https://doi.org/10.18637/jss.v022.i04) * Oksanen, J., Blanchet, F. G., Friendly, M., Kindt, R., Legendre, P., McGlinn, D., Minchin, P. R., O'Hara, R. B., Simpson, G. L., Solymos, P., Stevens, M. H. H., Szoecs, E., & Wagner, H. (2020). vegan: Community Ecology Package. R package version 2.5-7. [https://CRAN.R-project.org/package=vegan](https://CRAN.R-project.org/package=vegan) * Wagner, H. H., & Dray, S. (2015). Generating spatially constrained null models for irregularly spaced data using Moran spectral randomization methods. Methods in Ecology and Evolution, 6(10), 1169-1178. [https://doi.org/10.1111/2041-210X.12407](https://doi.org/10.1111/2041-210X.12407) [MSR methodology] * Wickham, H., François, R., Henry, L., & Müller, K. (2021). dplyr: A Grammar of Data Manipulation. R package version 1.0.7. [https://CRAN.R-project.org/package=dplyr](https://CRAN.R-project.org/package=dplyr) * Wickham, H. (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. [https://ggplot2.tidyverse.org](https://ggplot2.tidyverse.org) ## Date README initially composed 2025-06-30