Trait model for Mediterranean fish invasions
This repository contains the data and code used for the study on predicting potential marine fish invaders in the Mediterranean Sea using ecological, morphological, and anthropogenic traits. ## 📁 Contents ### 01_Traits_extractions.R# Description:# 1) Load species list with invasion status# 2) Retrieve trait data from FishBase, FAO, and IUCN# 3) Clean and merge all trait sources# 4) Filter out variables with ≥10% missing data# 5) Save the final trait dataset# 6) Report missingness for invasive species (informative)# 7) Generate and save Figure 1: trait distributions ### 02_Imputation_traits.R`Description:# 1) Load processed trait dataset# 2) Drop non-informative metadata columns# 3) Filter out species with >20% missing data# 4) Prepare predictor matrix:# - numeric vars (DepthMax/Min log-transformed)# - dummy-encoded factors# 5) Impute missing values via Random Forest (missForest)# 6) Compute imputation diagnostics (OOB‐error, % missing) and plot Figure 2# 7) Derive composite fishing‐exposure flags# 8) Subset to modeling traits only (drop unused columns)# 9) Save final imputed dataset for downstream analysis ### 03_Correlation.R`Description:# 1) Load final imputed & trimmed dataset# 2) Split into numeric vs factor# 3) Chi-square tests for categorical predictors vs Invasive# 4) Pearson correlation heatmap among numeric traits# 5) Identify highly correlated pairs (|r|>0.7)# 6) Univariate t-tests of numeric traits vs Invasive# 7) Plot and save:# • Figure 3: correlation heatmap# • Figure 4: –log10(p-values) barplot for key predictors# 8) Save high-correlation table ### 04. Modelling.R# Description:# 1) Load required libraries# 2) Load final dataset & recode Invasive# 3) (Fishing_AnyGear already present) Factorize fishing flags# 4) Scale continuous predictors# 5) Define final candidate set (5 traits)# 6) Random‐sampling model selection (60 formulas)# 7) Fit final INLA model# 8) Bootstrap coefficient stability (n = 50)# 9) Plot & save bootstrap results (Figure 5)# 10) (Optional) Predictive threshold evaluation & plotting --- ## Dependencies The R scripts require the following packages:- `tidyverse`- `missForest`- `INLA`- `caret`- `ggplot2`- `cowplot`- `patchwork` R version ≥ 4.1 is recommended. --- The main dataset (Complete_Med_list.csv) includes trait and invasion status data for 833 Mediterranean species. ## 📌 Notes - All code has been anonymized and stripped of author metadata for review purposes.- This dataset excludes any personal identifiers and is designed for reproducibility. --- ## 📬 Contact This repository was prepared for anonymous peer review. Questions will be addressed upon manuscript acceptance.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-07-11
- DOI
- https://doi.org/10.5281/zenodo.15863890
- Primary Topic
- Traffic Prediction and Management Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00