DOI: 10.5061/dryad.h70rxwdqw
title: Data from: Mother of all bonds: influences on spatial association across the lifespan in capuchins

description: In humans, being more socially integrated is associated with better
 physical and mental health and/or with lower mortality. This link between
 sociality and health may have ancient roots: sociality also predicts
 survival or reproduction in other mammals, such as rats, dolphins, and
 non-human primates. A key question, therefore, is which factors influence
 the degree of sociality over the life course.  Longitudinal data
 can provide valuable insight into how environmental variability drives
 individual differences in sociality and associated outcomes. The first
 year of life—when long-lived mammals are the most reliant on others for
 nourishment and protection—is likely to play an important role in how
 individuals learn to integrate into groups. Using behavioral, demographic,
 and pedigree information on 376 wild capuchin monkeys (Cebus imitator)
 across 20 years, we address how changes in group composition influence
 spatial association. We further try to determine the extent to which early
 maternal social environments have downstream effects on sociality across
 the juvenile and (sub)adult stages. We find a positive effect of early
 maternal spatial association, where female infants whose mothers spent
 more time around others also later spent more time around others as
 juveniles and subadults. Our results also highlight the importance of kin
 availability and other aspects of group composition (e.g. group size) in
 dynamically influencing spatial association across developmental stages.
 We bring attention to the importance of—and difficulty in—determining the
 social versus genetic influences that parents have on offspring
 phenotypes.
description: # Data from: Mother of all bonds: influences on spatial association across
 the lifespan in capuchins
 [https://doi.org/10.5061/dryad.h70rxwdqw](https://doi.org/10.5061/dryad.h70rxwdqw) Included here are all data and code necessary to replicate findings from “Mother of all bonds: influences on spatial association across the lifespan in capuchins” by Irene Godoy, Peter Korsten, and Susan E. Perry. You will need to have R installed. All analyses were conducting using R version 4.3.1. Download all files into one folder and set it as your working directory. You can create a subfolder ‘objects’ to save model objects in. We used the following R packages: brms (Version 2.19.0) tidyverse (Version 2.0.0) The following files were used for visualisation but are not required for analyses: rethinking ggplot2 ggthemes cowplot bayesplot #### THE FOLLOWING DATASETS ARE PROVIDED AS .CSV FILES: **“data_1_matProx_sub.csv”** - file containing data on early maternal social environments Columns: * Year: year of data collection * infant_age: age of infant, in years, when data point on the mother was taken * rad_366: day of data collection (as radian) * mins: time of day, as minutes into the day * type: whether instantaneous point sample was from a focal follow (Y) or focal scan (P) * inf_CC: whether the infant was in proximity to the mother (TRUE) or not (FALSE) * social: whether or not the mother was in proximity of another capuchin (1) or not (0) (response variable) * sex: sex of infant (“f” for female, “m” for male) * id_mom: identity of mother * id_infant: identity of infant **“data_2_extra_group.csv”** - file containing data on group composition Columns: * id: identity of focal (offspring) * Year: year of data collection * Month: month of data collection (string) * MM: month of data collection (integer) * Group: primary group of residence of the focal * offspring: number of offspring of any age (for females) present in group * n_fems: number of (sub)adult females (&gt;= 5 years of age) in the group of residence of the focal * n_mals: number of (sub)adult males (&gt;= 5 years of age) in the group of residence of the focal * n_juvs: number of juveniles (&lt; 5 years of age) in the group of residence of the focal * mat_kin: number of maternal kin (mother, maternal siblings) present in the group of residence of the focal * members: group size of the group of residence of the focal **“data_3_extra_early.csv”** - file containing information on early maternal rank Columns: * id: identity of focal (offspring) * mat_rank: average rank (0 lowest, 1 highest) of the focal’s mother during that focal’s first year of life (average early maternal rank) #### THE FOLLOWING DATASETS ARE ACCESSED THROUGH DRYAD IN THE R SCRIPTS (from Godoy et al. 2022): **Behavioural data file:** Godoy, Irene; Korsten, Peter; Perry, Susan (2022). Data from: Genetic, maternal, and environmental influences on sociality in a pedigreed primate population [Dataset]. Dryad. [https://doi.org/10.5061/dryad.mkkwh7136](https://doi.org/10.5061/dryad.mkkwh7136) File **“cebusData.csv”** Columns: * id: identity of focal * Year: year of data collection * Month: month of data collection (string) * n: number of focal scans for the focal in the month * animal: identity of focal (for linking to population pedigree) * Mother: identity of mother (for estimating maternal effects) * Sex: sex of focal (“Female” or “Male”) * age: age of focal in years * Group: primary group of residence of the focal, and identity of alpha male of the group of residence * social: number of focal scans where the focal was in proximity of another capuchin **Pedigree data file:** Godoy, Irene; Korsten, Peter; Perry, Susan (2022). Data from: Genetic, maternal, and environmental influences on sociality in a pedigreed primate population [Dataset]. Dryad. [https://doi.org/10.5061/dryad.mkkwh7136](https://doi.org/10.5061/dryad.mkkwh7136) File **“cebusPedigree.csv”** Columns: * animal: identity of focal * Mother: identity of mother * Father: identity of father #### BLUPs generated by the Mother models and Offspring models are also provided as .csv files: **“soc_scores_mothers1.csv”** Columns: * id: identity of offspring * Mother: identity of mother Early maternal scores: * mom_mu: mean, early maternal spatial association score (probability scale) * mom_sd: standard deviation, early maternal spatial association score (probability scale) * mom_scale_mu: mean, standardised early maternal spatial association score * mom_scale_sd: standard deviation, standardised early maternal spatial association score **“soc_scores_offspring.csv”** Columns: * id: identity of offspring Juveniles scores: * juv_mu: mean, juvenile spatial association score (probability scale) * juv_sd: standard deviation, juvenile spatial association score (probability scale) * juv_scale_mu: mean, standardised juvenile spatial association score * juv_scale_sd: standard deviation, standardised juvenile spatial association score Subadult scores: * mid_mu: mean, subadult spatial association score (probability scale) * mid_sd: standard deviation, subadult spatial association score (probability scale) * mid_scale_mu: mean, standardised subadult spatial association score * mid_scale_sd: standard deviation, standardised subadult spatial association score Adult scores: * adu_mu: mean, adult spatial association score (probability scale) * adu_sd: standard deviation, adult spatial association score (probability scale) * adu_scale_mu: mean, standardised adult spatial association score * adu_scale_sd: standard deviation, standardised adult spatial association score ## Code/Software Code used to run the main models are in the associated .R files. The code is written assuming at least 4 cores for running models in parallel. * “code_1_mods_soc_maternal.R” requires the use of “data_1_matProx_sub.csv” * “code_2_mods_soc_juv_mid_adu.R” requires the use of “data_2_extra_group.csv” * Access behavioural data from Dryad from Godoy et al. 2022 for file “code_2b_mods_soc_juv_mid_adu.R” #### Supplementary analyses Requires the use of the following data files: * “data_2_extra_group.csv” * Access behavioural data from Dryad from Godoy et al. 2022 * “code_3_mods_earlyEffects.R” requires the use of “data_3_extra_early.csv” * Access pedigree data from Dryad from Godoy et al. 2022 #### Code used to produce Figures are in the following .Rmd files * “figures_code_1.Rmd” - Figures produced from data or output from “code_1_mods_soc_maternal.R” * “figures_code_2.Rmd” - Figures produced from data or output from “code_2_mods_soc_juv_mid_adu.R” and “code_2b_mods_soc_juv_mid_adu.R” * To reproduce Fig 2, you will need the image file “2022.03.13.rf.igo_3311.JPG” * “figures_code_3.Rmd” - Figures produced from data or output from “code_3_mods_earlyEffects.R” #### Model outputs (objects) have also been saved as .rds files ##### Mother models (generated by “code\_1\_mods\_soc\_maternal.R”): * mod_mom1_bernoulli.rds - early maternal spatial association - to generate early maternal BLUPs for early maternal spatial association phenotypes ##### Offspring models (generated by “code\_2\_mods\_soc\_juv\_mid\_adu.R” and “code\_2b\_mods\_soc\_juv\_mid\_adu.R”): To generate offspring BLUPS for spatial association phenotypes * mod_juv_BB1.rds - juveniles spatial association * mod_juv_BB2.rds - Supplementary analysis, juvenile spatial association * mod_juv_BB3.rds - Supplementary analysis, juvenile spatial association * mod_mid_BB1.rds - subadult spatial association * mod_mid_BB2.rds - Supplementary analysis, subadult spatial association * mod_mid_BB3.rds - Supplementary analysis, subadult spatial association * mod_adu_BB1.rds - adult spatial association * mod_adu_BB2.rds - Supplementary analysis, adult spatial association * mod_adu_BB3.rds - Supplementary analysis, adult spatial association ##### Maternal effects on offspring models (generated by “code\_3\_mods\_earlyEffects.R”): To asses influence of early maternal spatial association (early maternal BLUPs) on later offspring spatial association (offspring BLUPs) * mod_juv_0.rds - juveniles, random effects only * mod_juv_1.rds - juveniles, early maternal spatial association and early maternal rank (interactions) * mod_juv_2.rds - juveniles, early maternal spatial association and early maternal rank (weak interactions removed) * mod_juv_3.rds - juveniles, early maternal rank * mod_mid_0.rds - subadults, random effects only * mod_mid_1.rds - subadults, early maternal spatial association and early maternal rank (interactions) * mod_mid_2.rds - subadults, early maternal spatial association and early maternal rank (weak interactions removed) * mod_mid_3.rds - subadults, early maternal rank * mod_adu_0.rds - adults, random effects only * mod_adu_1.rds - adults, early maternal spatial association and early maternal rank (interactions) * mod_adu_2.rds - adults, early maternal spatial association and early maternal rank (weak interactions removed) * mod_adu_3.rds - adults, early maternal rank