Data and code from: Lifetime fitness and annual survival are heritable and highly genetically correlated in a wild primate population
Data files
Apr 25, 2026 version files 1.27 GB
-
datasets_csv.zip
486.94 KB
-
datasets_txt.zip
487.96 KB
-
full_models.zip
1.27 GB
-
README_DATASET_DESCRIPTION.txt
11.85 KB
-
README_MODELS_LIST.txt
10.44 KB
-
README_SCRIPTS_DESCRIPTION.txt
4.31 KB
-
README.md
18.38 KB
-
scripts.zip
38.93 KB
Abstract
The additive genetic variance (VA) of fitness quantifies the expected response to selection; lifetime breeding success (LBS) is an effective metric of fitness in animal populations. However, data on LBS are relatively rare for wild populations of long-lived species, while time-limited metrics such as annual survival or fertility are more readily available. The magnitude of VA for these time-limited metrics, and the degree to which they are genetically correlated with LBS, remains unclear in most cases. Here we estimated the VA and heritability (h2) of LBS and four time-limited fitness metrics in wild female baboons in Kenya. The most highly heritable metrics were LBS (h2=0.25) and annual survival (h2=0.23). Notably, all the VA for LBS was attributable to survival to first successful reproduction. Furthermore, all fitness metrics examined were highly genetically correlated with each other, supporting the potential use of time-limited metrics where LBS data are limited. Our analyses predicted faster phenotypic evolution than we observed, raising the possibility that environmental effects have masked responses to selection (“cryptic evolution”) or that social effects inflate estimated VA. Together, our findings reveal a substantial genetic contribution to variation in survival, and in turn, to fitness and contemporary evolution in a long-lived animal.
Dataset DOI: 10.5061/dryad.pzgmsbd22
Description of the data and file structure
Datasets and code for the manuscript "Lifetime fitness and annual survival are heritable and highly genetically correlated in a wild primate population", by Tuliozi et al. The code and datasets hereby provided allow to replicate all main results of the manuscript.
We provide datasets, code, and R objects (completed models), as several of the models are extremely time-consuming to run. We investigated the genetic variance of time-limited and lifetime fitness metrics using bayesian mixed-models ("animal models") to partition the variance in fitness. All models need a pedigree to run (provided) and the datasets, which are tables of phenotypic records associated to an individual's identity and to ecological conditions at the time of the record. Refer to the read_me txt files for further instructions on how to run the analyses.
Files and variables
File: datasets_csv.zip
Description: MATERIALS TO REPRODUCE RESULTS: DATASETS CSV
NOTE that all models use .txt to run, but we provide .csv files to allow an easier exploration of the datasets. See read_me for more detailed descriptions of all these!
1) “dataset_annual.csv”. Dataset with annual fitness metrics. Corresponds to the txt necessary for univariate analyses of: annual reproductive success (1.1), annual survival (1.2), annual breeding success (3.1), for bivariate analyses of: bivariate annual reproductive success x annual survival (2.1), bivariate annual breeding success x annual survival, and for figures: S1-S4.
2) “dataset_triannual.csv”. Dataset with triannual reproductive success. Corresponds to the .txt necessary for univariate analyses of triannual reproductive success (1.3) and triannual breeding success (3.2).
3) “dataset_lifetime.csv”. Dataset with lifetime fitness metrics. Corresponds to the .txt necessary for univariate analyses of binary LRS (1.4), LRS (1.5), binary LBS (3.3), LBS (3.4), survival to maturity (3.15); and for bivariate analysis of binary LRS x LRS (2.10) and binary LBS x LBS (3.14).
4) “dataset_annual_triannual.csv”. Dataset for bivariate analyses of annual and triannual fitness metrics. The annual and triannual data are stacked atop each other. Corresponds to the .txt necessary for bivariate analyses of annual reproductive success x triannual reproductive success (2.2), annual survival x triannual reproductive success (2.3), annual breeding success x triannual breeding success (3.6), and annual survival x triannual breeding success (3.7).
5) “dataset_annual_lifetime.csv”. Dataset for bivariate analyses of annual and lifetime fitness metrics. The annual and lifetime data are stacked atop each other. Corresponds to the .txt necessary for bivariate analyses of annual reproductive success x binary LRS (2.4), annual survival x binary LRS (2.5), annual reproductive success x LRS (2.7), annual survival x LRS (2.8), annual breeding success x binary LBS (3.8), annual survival x binary LBS (3.9), annual breeding success x LBS (3.11), annual survival x LBS (3.12).
6) “dataset_triannual_lifetime.csv”. Dataset for bivariate analyses of triannual and lifetime fitness metrics. The triannual and lifetime data are stacked atop each other. Necessary for bivariate analyses of triannual reproductive success x binary LRS (2.6), triannual reproductive success x LRS (2.9), triannual breeding success x binary LBS (3.10), triannual breeding success x LBS (3.13).
File: datasets_txt.zip
Description: All models use .txt to run. Same datasets as for the .csv: use the read_me for more detailed descriptions of all these!
1) “annual_dataset020326”. Necessary for univariate analyses of: annual reproductive success (1.1), annual survival (1.2), annual breeding success (3.1), for bivariate analyses of: bivariate annual reproductive success x annual survival (2.1), bivariate annual breeding success x annual survival, and for figures: S1-S4.
2) “triannual_dataset020326.txt”. Dataset with triannual reproductive success. Necessary for univariate analyses of triannual reproductive success (1.3) and triannual breeding success (3.2).
3) “lifetime_dataset020326.txt”. Dataset with lifetime fitness metrics. Necessary for univariate analyses of binary LRS (1.4), LRS (1.5), binary LBS (3.3), LBS (3.4), survival to maturity (3.15); and for bivariate analysis of binary LRS x LRS (2.10) and binary LBS x LBS (3.14).
4) “annual_triannual_dataset020326.txt”. Dataset for bivariate analyses of annual and triannual fitness metrics. The annual and triannual data are stacked atop each other. Necessary for bivariate analyses of annual reproductive success x triannual reproductive success (2.2), annual survival x triannual reproductive success (2.3), annual breeding success x triannual breeding success (3.6), and annual survival x triannual breeding success (3.7).
5) “annual_lifetime_dataset020326.txt”. Dataset for bivariate analyses of annual and lifetime fitness metrics. The annual and lifetime data are stacked atop each other. Necessary for bivariate analyses of annual reproductive success x binary LRS (2.4), annual survival x binary LRS (2.5), annual reproductive success x LRS (2.7), annual survival x LRS (2.8), annual breeding success x binary LBS (3.8), annual survival x binary LBS (3.9), annual breeding success x LBS (3.11), annual survival x LBS (3.12).
6) “triannual_lifetime_dataset020326.txt”. Dataset for bivariate analyses of triannual and lifetime fitness metrics. The triannual and lifetime data are stacked atop each other. Necessary for bivariate analyses of triannual reproductive success x binary LRS (2.6), triannual reproductive success x LRS (2.9), triannual breeding success x binary LBS (3.10), triannual breeding success x LBS (3.13).
7) "pedigree101125.txt". Pedigree for all analyses (individual, mother and father).
File: README_DATASET_DESCRIPTION.txt
Description: Read me relative to the datasets.
File: scripts.zip
Description: Given the large size of the models and the long time needed to run to obtain solid results, I provide my completed model objects alongside the code to replicate them. I provide 4 scripts (greater details in the corresponding read_me).
1) “model_results.R”. Loads the completed models and obtains in a few minutes the main results. Needs all provided RData completed model and lifetime_dataset020326.txt to run.
2) “univariate_models.R”. This is the code to prepare and run by scratch all univariate models. Needs datasets and pedigree to run. NOTE that it also loads the completed models for clarity, but it overwrites them once you re-run them. NOTE also that it is currently set to minimum number of iterations - inside there are instructions on how to run it with the correct numerosity.
3) “bivariate_model.R”. This is the code to prepare and run by scratch all bivariate models. Needs datasets and pedigree to work. NOTE that it also loads the completed models for clarity, but it overwrites them once you re-run them. NOTE also that it is currently set to minimum number of iterations - inside there are instructions on how to run it with the correct numerosity.
4) “figures.R”. Code to prepare all figures – needs access to both datasets and completed models to run.
5) "model_results_alt_metrics.R". Loads the completed models obtained with the alternative fitness metrics (breeding success metrics and survival to maturity); needs all provided RData completed models and dataset_lifetime.txt to run. NOTE that the code to run the models for this metrics is IDENTICAL to the code for the corresponding "main" fitness metric - further instructions for how to run the models by scratch are inside this script.
File: README_SCRIPTS_DESCRIPTION.txt
Description: Readme to reproduce results with the scripts
File: full_models.zip
Description: These are the R objects that were obtained by the models described in the study. In parentheses the reference number of the analysis that created the object (see the scripts). Note that all bivariates and univariate LBS analyses also produced an object for the variances back-transformed to the data scale, as the back-transformation in those cases also requires a long time.
- “annual_reproductive_success010326.RData”. Contains the model analyzing the fitness metric annual reproductive success (1.1).
- “annual_survival4.RData”. Contains the model analyzing the fitness metric annual survival (1.2).
- “annual_survival_EBV4.RData”. Contains the model analyzing the fitness metric annual survival, inclusive of all EBV (used for figures S3, S4).
- “triannual_reproductive_success010326.RData”. Contains the model analyzing the fitness metric triannual reproductive success (1.3).
- “binary_LRS010326.RData”. Contains the model analyzing the fitness metric binary LRS (1.4).
- “LRS010326.RData”. Contains the model analyzing the fitness metric LRS (1.5).
- “LRS_added_vaw010326.RData”. Contains the model analyzing the fitness metric LRS and in addition the back-transformed variances of relative fitness (1.5.4).
- “back_transf_LRS.RData”. Contains the back-transformed variances obtained from the model “LRS010326.RData” (back-transformed LRS, 1.5).
- “annual_breeding_success010326.RData”. Contains the model analyzing the fitness metric annual breeding success (3.1).
- “triannual_breeding_success010326.RData”. Contains the model analyzing the fitness metric triannual breeding success (3.2).
- “binary_LBS010326.RData”. Contains the model analyzing the fitness metric binary LBS (3.3).
- “LBS010326.RData”. Contains the model analyzing the fitness metric LBS (3.4).
- “back_transf_LBS010326.RData”. Contains the back-transformed variances obtained from the model “LBS010326.RData” (back-transformed LBS, 3.4).
- “survival_to_maturity010326.RData”. Contains the model analyzing the fitness metric survival to maturity (3.15).
------------------------------- -------------------- --------------------- ----------------------------
- “biv_annual_RS_annual_survival010326.RData”. Contains the bivariate model annual reproductive success x annual survival (2.1).
- “back_transf_ann_RS_ann_surv010326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_RS_annual_survival010326.RData ” (back-transformed variances for annual reproductive success x annual survival, 2.1).
- “biv_annual_RS_triannual_RS010326.RData”. Contains the bivariate model annual reproductive success x triannual reproductive success (2.2).
- “back_transf_annual_RS_triannual_RS .RData”. Contains the back-transformed variances obtained from the model “biv_annual_RS_triannual_RS010326.RData” (back-transformed variances for annual reproductive success x triannual reproductive success, 2.2).
- “biv_annual_surv_triannual_RS010326.RData”. Contains the bivariate model annual survival x triannual reproductive success (2.3).
- “back_transf_annual_surv_triannual_RS.RData”. Contains the back-transformed variances obtained from the model “biv_annual_surv_triannual_RS010326.RData ” (back-transformed variances for annual survival x triannual reproductive success, 2.3).
- “biv_annual_RS_binary_LRS010326.RData”. Contains the bivariate model annual reproductive success x binary LRS (2.4).
- “back_transf_annual_RS_binary_LRS .RData”. Contains the back-transformed variances obtained from the model “biv_annual_RS_binary_LRS010326.RData .RData” (back-transformed variances for annual reproductive success x binary LBS, 2.4).
- biv_annual_survival_binary_LRS010326.RData”. Contains the bivariate model annual survival x binary LRS (2.5).
- “back_transf_annual_survival_binary_LRS.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_binary_LRS010326.RData ” (back-transformed variances for annual survival x binary LRS, 2.5).
- “biv_triannual_RS_binary_LRS010326.RData”. Contains the bivariate model triannual reproductive success x binary LRS (2.6).
- “back_transf_triannual_RS_binary_LRS.RData”. Contains the back-transformed variances obtained from the model “biv_triannual_RS_binary_LRS010326.RData” (back-transformed variances for triannual reproductive success x binary LRS, 2.6).
- “biv_annual_RS_LRS010326.RData”. Contains the bivariate model annual reproductive success x LRS (2.7).
- “back_transf_annual_RS_LRS .RData”. Contains the back-transformed variances obtained from the model “biv_annual_RS_LRS010326.RData ” (back-transformed variances for annual reproductive success x LRS, 2.7).
- “biv_annual_survival_LRS010326.RData”. Contains the bivariate model annual survival x LRS (2.8).
- “back_transf_annual_survival_LRS.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_LRS010326.RData ” (back-transformed variances for annual survival x LRS, 2.8).
- “biv_triannual_RS_LRS010326.RData”. Contains the bivariate model triannual reproductive success x LRS (2.9).
- “back_transf_triannual_RS_LRS.RData”. Contains the back-transformed variances obtained from the model “biv_triannual_RS_LRS010326.RData” (back-transformed variances for triannual RS x LRS, 2.9).
- “biv_LRS_binary_LRS010326.RData”. Contains the bivariate model binary LRS x LRS (2.10).
- “back_transf_LRS_binary_LRS.RData”. Contains the back-transformed variances obtained from the model “biv_LRS_binary_LRS010326.RData ” (back-transformed variances for binary LRS x LRS, 2.10).
------------------------------- -------------------- --------------------- ----------------------------
- “biv_annual_BS_annual_survival010326.RData”. Contains the bivariate model annual breeding success x annual survival (3.5).
- “back_transf_ann_BS_ann_surv010326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_BS_annual_survival010326.RData” (back-transformed variances for annual breeding success x annual survival, 3.5).
- “biv_annual_BS_triannual_BS010326.RData”. Contains the bivariate model annual breeding success x triannual breeding success (3.6).
- “back_transf_annual_BS_triannual_BS010326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_BS_triannual_BS010326.RData” (back-transformed variances for annual breeding success x triannual breeding success, 3.6).
- “biv_annual_survival_triannual_BS010326.RData”. Contains the bivariate model annual survival x triannual breeding success (3.7).
- “back_transf_annual_surv_triannual_BS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_triannual_BS010326.RData” (back-transformed variances for annual survival x triannual breeding success, 3.7).
- “biv_annual_BS_binary_LBS010326.RData”. Contains the bivariate model annual breeding success x binary LBS (3.8).
- “back_transf_annual_BS_binary_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_BS_binary_LBS010326.RData” (back-transformed variances for annual breeding success x binary LBS, 3.8).
- biv_annual_survival_binary_LBS010326.RData”. Contains the bivariate model annual survival x binary LBS (3.9).
- “back_transf_annual_survival_binary_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_x_binary_LBS010326.RData” (back-transformed variances for annual survival x binary LBS, 3.9).
- “biv_annual_survival_binary_LBS010326.RData”. Contains the bivariate model triannual breeding success x binary LBS (3.10).
- “back_transf_triannual_BS_binary_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_binary_LBS010326.RData” (back-transformed variances for triannual breeding success x binary LBS, 3.10).
- “biv_annual_BS_LBS010326.RData”. Contains the bivariate model annual breeding success x LBS (3.11).
- “back_transf_annual_BS_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_BS_LBS010326.RData”.” (back-transformed variances for annual breeding success x LBS, 3.11).
- “biv_annual_survival_LBS010326.RData”. Contains the bivariate model annual survival x LBS (3.12).
- “back_transf_annual_survival_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_annual_survival_LBS010326.RData” (back-transformed variances for annual survival x LBS, 3.12).
- “biv_triannual_BS_LBS010326.RData”. Contains the bivariate model triannual breeding success x LBS (3.13).
- “back_transf_triannual_BS_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_triannual_BS_LBS010326.RData” (back-transformed variances for triannual BS x LBS, 3.13).
- “biv_LBS_binary_LBS010326.RData”. Contains the bivariate model binary LBS x LBS (3.14).
- “back_transf_LBS_binary_LBS020326.RData”. Contains the back-transformed variances obtained from the model “biv_LBS_binary_LBS010326.RData” (back-transformed variances for binary LBS x LBS, 3.14).
File: README_MODELS_LIST.txt
Description: Readme listing all model objects
Code/software
All analyses were run in R, version 4.3.3. Instructions and necessary packages are in the scripts. Scripts "bivariate_models.R" and "univariate_models.R" need pedigree and datasets to run; "model_results.R" need the R objects; "figures.R" need all R objects obtained from univariate analysis and dataset_annual020326.txt
