Published April 17, 2026 | Version v1
Model Open

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"

  • 1. ROR icon InnovPlantProtect
  • 2. Faculdade de Ciências da Universidade do Porto

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 glmmTMB package to handle bounded proportion data (0-100%). Key steps include the Smithson-Verkuilen transformation for raw defoliation percentages, collinearity checks, and residual diagnostics using the DHARMa package. 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 in glmmTMB to account for overdispersed count data. The workflow includes automated model selection (MuMIn dredge), predictive performance evaluation (MAE/RMSE), and residual diagnostics. Finally, it uses the ggeffects and ggplot2 packages to calculate marginal effects and generate faceted, publication-ready visualizations of species-specific reproductive strategies.

Files

Files (10.2 kB)

Name Size
md5:e130e415b0cf8bd2e8b125fbf9959a7c
5.8 kB Download
md5:95eac1215ea63f0076c9df847ed2bdc2
4.4 kB Download

Additional details

Software

Programming language
R