Data and scripts for Disentangling the role of intraspecific trait variation in community assembly with joint species-trait distribution modelling
收藏NIAID Data Ecosystem2026-05-02 收录
下载链接:
https://zenodo.org/record/11401788
下载链接
链接失效反馈官方服务:
资源简介:
The README explains how to reproduce the analyses presented in the paper " Disentangling the role of intraspecific trait variation in community assembly with joint species-trait distribution modelling" by Abrego et al.
The input data for the script pipeline is the file “Kilpisjarvi_plant_data.csv”. This file includes the data on the plants and their traits in the long format. Hence, each row of the data matrix corresponds to measurements on one plant species in one study plot. The joint species-trait distribution modelling (JSTDM) pipeline that analyses these data consists of the following R-scripts.
· S1_define_JSTDM_models.R. This script defines the JSDTM models (null model and environmental model) that include five response types for each species: the presence-absence, abundance conditional on presence, and the plot-level trait values of SLA, LA and MH. The model is defined in the Hierarchical Modelling of Species Communities (HMSC) framework utilizing the R-package Hmsc. The models are saved in the file “unfitted_models.RData”.
· S2_fit_models.R. This script loads the unfitted models and fits them using the posterior sampling methods implemented in the R-package Hmsc. The models are fitted with increasing thinning until thin=100, which value was used to generate the results of the paper. The fitted models are saved in the file "models_thin_100_samples_250_chains_4.Rdata".
· S3_plot_Omega_matrices.R. This script loads the fitted models and plots the association matrices (Fig. 3 of the paper).
· S4_show_VP_Beta_Gamma.R. This script loads the fitted models and extracts information on the variance partitionings (VP; Figs. S1 and S2 of the paper), the relationships between response types and environmental predictors (beta; Fig. 4 of the paper), and the relationships between response types and species-level traits (gamma; Fig. 5 of the paper).
· S5_conditional_cross_validation.R. This script performs 10-fold cross validation to the data to test the predictive power related to the modelled plant traits. The script performs both regular (unconditional) cross-validation where all data are masked for the test fold, and conditional cross-validation where only the trait data (but not the abundance data) are masked for the test fold.
· S6_show_conditional_cross_validation_results.R. This script plots the results of cross-validation (Fig. 6 of the paper).
· S7_scenario_predictions.R. This script performs the scenario simulations described in Table 1 of the paper, generating the results shown in Fig. 7 of the paper.
创建时间:
2024-05-31



