cc-by-4.0Ovaskainen, Otso2025-04-292024-06-202024-06-20https://datakatalogi.helsinki.fi/handle/123456789/5485The results presented in the manuscript “The role of stochasticity in fungal community assembly – explaining apparent stochasticity by field experiments” can be reproduced by the data and scripts provided in this repository. Concerning the analysis of observational data: · The file ObservationalData.RData includes all data: XData is the dataframe including the predictors, and t is the vector of responses (F. rosea occurrences). · The script O1_model_observational_data.R defines the models, fits the models, and computes model fits based on cross-validation. The results are saved into a file. · The script O2_show_results_observational_data.R loads the results saved by the previous script, and outputs the results reported in the manuscript. Concerning the analysis of experimental data: · The file ExperimentalData.RData includes all data: the dataframe meta includes the relevant predictors, otu.table the matrix of samples x OTU read counts, and the dataframe taxonomy the taxonomic placement of those OTUs. · The script E1_compute_model_based_ordinations.R precomputes the gllvm-ordinations needed both for the colonization success model as well as the community divergence model. The precomputed ordinations are saved into a file. · The script E2_model_colonization_success.R defines the colonization success model, fits the model, and computes model fit based on cross-validation. The results are saved into a file. · The script E3_show_colonization_model_results.R loads the results saved by the previous script, and outputs the results reported in the manuscript. · The script E4_model_community_divergence defines the community divergence model and fits the model. The results are saved into a file. · The script E5_show_community_divergence_model_results.R loads the results saved by the previous scripts, and outputs the results reported in the manuscript, including Table 1 and Figure 2.Data and scripts for "The role of stochasticity in fungal community assembly – explaining apparent stochasticity with field experiments"dataset