Model 1 and 2 used in the study "Drivers of Tree Health and Reproduction in Mediterranean Oaks: Trade-offs Between Tree Size, Biotic Stress, and Acorn Production"
Authors/Creators
Description
Script 1: Drivers of Oak Defoliation (Beta Mixed-Effects Model)
Description: This R script contains the data tidying, statistical modeling, and visualization pipeline to identify the structural and biotic predictors of crown defoliation in Mediterranean oaks (Quercus spp.). The workflow utilizes a Beta Mixed-Effects Model framework via the
glmmTMBpackage to handle bounded proportion data (0-100%). Key steps include the Smithson-Verkuilen transformation for raw defoliation percentages, collinearity checks, and residual diagnostics using theDHARMapackage. The script concludes with the generation of publication-ready forest plots displaying the Odds Ratios of structural vulnerabilities (e.g., DBH) and biotic pressures (e.g., Cerambycidae presence).
Script 2: Predictors of Acorn Production (Negative Binomial Mixed Model)
Description: This R script provides the complete analytical pipeline to evaluate the effects of tree architecture and phytosanitary state on the reproductive output of Quercus suber and Q. ilex. The script processes raw field trap data, standardizes continuous structural variables, and fits a Generalized Linear Mixed Model (GLMM) using the
nbinom2(quadratic variance) parameterization inglmmTMBto account for overdispersed count data. The workflow includes automated model selection (MuMIndredge), predictive performance evaluation (MAE/RMSE), and residual diagnostics. Finally, it uses theggeffectsandggplot2packages to calculate marginal effects and generate faceted, publication-ready visualizations of species-specific reproductive strategies.
Files
Additional details
Software
- Programming language
- R