Dataset and R code for: Sex-dependent influence of major histocompatibility complex diversity on fitness in a social mammal
收藏Figshare2025-07-17 更新2026-04-28 收录
下载链接:
https://figshare.com/articles/dataset/Dataset_and_R_code_for_Sex-dependent_influence_of_major_histocompatibility_complex_diversity_on_fitness_in_a_social_mammal/28322984
下载链接
链接失效反馈官方服务:
资源简介:
This data includes R code and data necessary to reproduce manuscript results and figures. The code has been written by Nadine Schubert (nadine.schubert-at-uni-bielefeld.de) and Jamie Winternitz (jcwinternitz-at-gmail.com).The R code is titled 'R code - Sex-specific MHC and fitness manuscript.R' This script includes the following major sections:Library Loading and Setup: Loads required R packages and sets global options.Data Import and Preprocessing: Imports cleaned data and prepares variables for analysis, including scaling, centering, and creating interaction terms.Model Fitting: Fits a series of generalized linear mixed models (GLMMs) modeling different fitness components (e.g., pup survival, lifetime reproductive success) as functions of MHC diversity and covariates.Model Diagnostics: Performs diagnostic checks using 'performance' and 'DHARMa' to assess model assumptions.Predicted Effects and Visualization Preparation: Uses `ggeffects` to generate predicted values and marginal effects from the fitted models for visualization.Plotting: Creates customized `ggplot2` figures showing predicted model effects along with raw data points for interpretability.The datasets required for the R code are the following:MHCI Ex2 - Complete data frame with new weather data_July2024_noout.csvMHCI Ex3 - Complete data frame with new weather data_July2024_noout.csvMHCII - Complete data frame with new weather data_July2024_noout.csvFor questions or reproduction of results, please refer to the manuscript or contact the authors.
创建时间:
2025-07-17



