LTMP data and scripts for analysis
收藏Figshare2024-03-15 更新2026-04-28 收录
下载链接:
https://figshare.com/articles/dataset/LTMP_data_and_scripts_for_analysis/24961575
下载链接
链接失效反馈官方服务:
资源简介:
This repository contains the data, the R and Stan scripts used to implement the analyses in the manuscript “High response diversity and conspecific density-dependence, not species interactions, drive dynamics of coral reef fish communities”. There are 27 files in total. We did not include the model fits as they are big files (~15-17GB). We ran the model fits on the HPC at James Cook University.LTMP data and data wranglingLTMP_data_1995_2005_prop_zero_20sp.RData: File containing 25 columns. The first column is Year and it contains the year for each observation in the dataset. The second column Reef contains the reef name, while the latitude and longitude are collected in the 3rd column called Reef_lat and 4th column called Reef_long, respectively. The fifth column is called Shelf and contains the reef shelf position as I for Inner shelf positioning, M for Middle Shelf positioning and O for outer Shelf positioning. The rest of the columns contain the counts of the 20 species with the lowest proportion of zeros in the LTMP data.LTMP_data_1995_2005_prop_zero_40sp.Rdata: File containing 45 columns. The data structure is the same as the file above, but this includes the abundances for the 40 species with the lowest proportion of zeros in the LTMP data.dw_Pomacentrids_20sp.R and dw_Pomacentrids_40sp.R scripts order species in pomacentrids and non-pomacentrids so the models can be fitted to the data. These files produce the data files LTMP_data_1995_2005_prop_zero_20sp_Pomacentrids.Rdata and LTMP_data_1995_2005_prop_zero_40sp_Pomacentrids.RdataModel fittingLTMP_fit_40sp_D2.R, LTMP_fit_40sp_D4.R, LTMP_fit_40sp_D6.R, LTMP_fit_40sp_D8.R, LTMP_fit_40sp_D10.R and LTMP_fit_40sp_D12.R are scripts that fit the models with 2, 4, 6, 8, 10 and 12 latent variables to the LTMP dataset with 40 species.LTMP_fit_20sp.R is a script that fits the model (2 latent variables) to the LTMP dataset with 20 species.LTMP_fit_20sp_randReef_prior.R is a script that fits the model (2 latent variables) to the LTMP dataset with 20 species and also includes random effects at the reef level.Cross-validationpoilog_D2.R, poilog_D4.R, poilog_D6.R, poilog_D8.R, poilog_D10.R and poilog_D12.R estimate the likelihood for the model fit with 2, 4, 6, 8, 10 and 12 latent variables, respectively.Model_comparison_TableS2: Produces the Table S2 in the appendix, which shows the model comparison based on the ELPD.Stan modelsMARPLN_RHS_LV_Pomacentrids.stan: Stan script for the multivariate autoregressive Poisson-Lognormal model with the regularised horseshoe prior and latent variables fitted to the LTMP data.MARPLN_RHS_LV_NonPomacentrids_Rrand_prior.stan: Stan script for the multivariate autoregressive Poisson-Lognormal model with the regularised horseshoe prior and latent variables. This model was fitted to non-pomacentrid species, and it included reef random effects for the intrinsic growth rates and the intraspecific density dependence. It also has tighter priors to ensure convergence.FiguresFigure 3.R, Figure 4.R, Figure 5.R and Figure 6.R produce the corresponding figures in the main text of the manuscript.
创建时间:
2024-03-15



