# Shared community effects and the non-genetic maternal environment shape cortisol levels in wild chimpanzees

Patrick J Tkaczynski, Fabrizio Mafessoni, Cédric Girard-Buttoz, Liran Samuni, Corinne Y Ackermann, Pawel Fedurek, Cristina Gomes, Catherine Hobaiter, Therese Löhrich, Virgile Manin, et al.

<figure><img src="image_1.png" /></figure>

## To cite this version:

Patrick J Tkaczynski, Fabrizio Mafessoni, Cédric Girard-Buttoz, Liran Samuni, Corinne Y Ackermann, et al. Shared community effects and the non-genetic maternal environment shape cortisol levels in wild chimpanzees. Communications Biology, 2023, 6 (1), pp.565. 10.1038/s42003-023-04909-9. hal-05044006

HAL Id: hal-05044006

https://cnrs.hal.science/hal-05044006v1

Submitted on 23 Apr 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

# Shared community effects and the non-genetic maternal environment shape cortisol levels in wild chimpanzees

Patrick J. Tkaczynski ID <fnref n="1" />,²,³,¹⁷✉, Fabrizio Mafessoni ID <fnref n="1" />,⁴,¹⁷✉, Cédric Girard-Buttoz<fnref n="1" />,²,⁵, Liran Samuni ID <fnref n="1" />,²,⁶,⁷, Corinne Y. Ackermann⁸, Pawel Fedurek<fnref n="9" />, Cristina Gomes¹⁰, Catherine Hobaiter⁷, Therese Löhrich¹¹,<fnref n="12" />, Virgile Manin<fnref n="1" />,², Anna Preis², Prince D. Valé<fnref n="1" />,²,¹³, Erin G. Wessling⁶, Livia Wittiger¹⁴, Zinta Zommers¹⁵, Klaus Zuberbuehler⁸, Linda Vigilant ID <fnref n="1" />, Tobias Deschner¹⁶, Roman M. Wittig<fnref n="1" />,²,⁵,¹⁸ & Catherine Crockford<fnref n="1" />,²,⁵,¹⁸

Mechanisms of inheritance remain poorly defined for many fitness-mediating traits, especially in long-lived animals with protracted development. Using 6,123 urinary samples from 170 wild chimpanzees, we examined the contributions of genetics, non-genetic maternal effects, and shared community effects on variation in cortisol levels, an established predictor of survival in long-lived primates. Despite evidence for consistent individual variation in cortisol levels across years, between-group effects were more influential and made an overwhelming contribution to variation in this trait. Focusing on within-group variation, non-genetic maternal effects accounted for 8% of the individual differences in average cortisol levels, significantly more than that attributable to genetic factors, which was indistinguishable from zero. These maternal effects are consistent with a primary role of a shared environment in shaping physiology. For chimpanzees, and perhaps other species with long life histories, community and maternal effects appear more relevant than genetic inheritance in shaping key physiological traits.

<footnote n="1">¹Max Planck Institute for Evolutionary Anthropology, Leipzig, Germany. ²Taï Chimpanzee Project, Centre Suisse de Recherches Scientifiques, Abidjan, Côte d'Ivoire. ³School of Biological and Environmental Sciences, Liverpool John Moores University, Liverpool, UK. ⁴Weizmann Institute of Science, Department of Plant and Environmental Sciences, Rehovot, Israel. ⁵The Ape Social Mind Lab, Institut des Sciences Cognitives, CNRS UMR 5229 Lyon, France. ⁶Department of Human Evolutionary Biology, Harvard University, Cambridge, MA, USA. ⁷Centre for Social Learning & Cognitive Evolution, School of Psychology & Neuroscience, University of St Andrews, St Andrews, UK. ⁸Universite de Neuchatel, Institut de Biologie, Cognition Compare, Neuchatel, Switzerland.</footnote>

<footnote n="9">⁹Division of Psychology, University of Stirling, Stirling, UK. ¹⁰Tropical Conservation Institute, Institute of Environment, College of Arts, Science and Education, Florida International University, Miami, FL, USA. ¹¹World Wide Fund for Nature, Dzanga Sangha Protected Areas, BP 1053 Bangui, Central African Republic.</footnote>

<footnote n="12">¹²Robert Koch Institute, Epidemiology of Highly Pathogenic Microorganisms, Berlin, Germany. ¹³Unité de Formation et de Recherche Agroferesterie, Université Jean Lorougnon Guédé, Daloa, Côte d'Ivoire. ¹⁴WWF Deutschland, Berlin, Germany. ¹⁵Perry World House, University of Pennsylvania, Philadelphia, USA. ¹⁶Institute of Cognitive Science, Comparative BioCognition, University of Osnabrück, Osnabrück, Germany. ¹⁷These authors contributed equally: Patrick J. Tkaczynski, Fabrizio Mafessoni. ¹⁸These authors jointly supervised this work: Roman M. Wittig, Catherine Crockford.</footnote>

<footnote>✉email: pjtresearchltd@gmail.com; fabrizio.mafessoni@gmail.com</footnote>
In vertebrates, glucocorticoids (GCs) such as cortisol, secreted via the hypothalamic-pituitary-adrenal (HPA) axis, facilitate homeostasis via mediation of metabolic, immune, and behavioral responses to intrinsic and extrinsic stressors¹⁻³. As a consequence of this multi-faceted and dynamic role, the regulation of HPA axis activation and GC secretion is of broad interest to ecologists and evolutionary biologists seeking to understand how animals adapt to changing environments⁴⁻⁷. Despite the flexibility of HPA axis activity in response to external and internal stimuli, numerous studies demonstrate consistent individual differences in HPA axis activity and reactivity to environmental stimuli⁸. Inter-individual variation in HPA axis regulation is linked to variation in immune function and can be predictive of variation in fitness outcomes⁵,⁹⁻¹¹. For example, in both baboons and gray mouse lemurs, individuals with consistently elevated HPA axis activity have poorer survival outcomes and live substantially shorter lives than those with lower HPA axis activity⁹,¹². Given the profound fitness effects of individual differences in HPA axis activity and regulation, understanding the relative role of genetics, experience, and environment in shaping these GC phenotypes is key to deciphering the evolution of physiological plasticity⁵,¹³.

Results from human twin studies indicate that as much as 60% of the variation in cortisol levels may be explained by genetic effects¹⁴⁻¹⁷. While twin studies in humans have been important in revealing the genetic regulation of cortisol levels, they are often limited due to issues related to short-term sampling¹⁸⁻²⁰ and the restricted information available on the individual- and environmental-level factors that can become conflated within genetic effect estimates in human research¹⁹,²¹,²². Where the relative contributions of genes and environment have been assessed in relation to variation in cortisol levels or other health-related factors in humans, researchers often find a greater influence of shared family environments as compared to genetics (e.g. ref. ²⁰). However, these human studies are still often not able to delineate how much these familial effects are a product of parental effects or the macroenvironment in which families are situated, e.g. broader socioeconomic environments¹⁸,²⁰⁻²².

Non-human animal (hereafter animal) studies are less constrained than most human studies as researchers can either use experimental procedures, for example cross-fostering, or include appropriate environmental variables in their modeling to better account for shared environmental effects²³⁻²⁷. Like the aforementioned human studies, the animal literature suggests genetic inheritance plays a clear role in the formation of GC phenotypes, with, on average, 30% of the variation in cortisol patterns explained by genetic effects in these studies²³⁻²⁷. However, this work has largely focused on short-lived species²³,²⁴,²⁶,²⁷; (although see ref. ²⁵). Therefore, beyond human studies, we know comparatively little about how GC phenotypes emerge and are maintained in other long-lived species with protracted parental care. Determining the relative contributions of genetics, the microenvironment of parental effects, and the broader socio-ecological macroenvironment to variation in GC phenotypes is an important topic in evolutionary ecology. It can help us to understand the evolution of protracted development as a life history adaptation and the importance of non-genetic parental effects and plasticity within that extended ontogenetic phase.

Parental, and especially maternal, effects are recognized as major evolutionary drivers of phenotypic trait variation²⁸, including the regulation of cortisol and other GC levels²⁹⁻³³. In experimental rodent studies, maternal cortisol levels during pregnancy and during post-partum offspring rearing, as well as rates of maternal interaction with offspring, are all predictors of offspring cortisol levels and reactivity²⁹,³¹,³⁴. Rodent studies also suggest that maternal effects may occur via epigenetic processes,

such as DNA methylation of GC receptor promoter regions, leading to altered responsivity to stressors²⁹,³²,³⁴. Primate studies of the role of maternal effects on cortisol secretion and reactivity have typically employed maternal deprivation paradigms, either via experimental separations or due to naturally occurring maternal loss²⁹,³⁰,³³. Here, maternal loss is linked to elevations in cortisol levels or alterations to diurnal rhythm³⁰, however, these effects do not necessarily last into adulthood³⁰,³³. Similarly, in human studies, tests of maternal effects on cortisol regulation classically examine the consequences of negative maternal or early life circumstances (e.g. poor mental or physical health, low socioeconomic status, or maternal loss (reviewed in ref. ²⁹)). Here, maternal loss or early life adversity related to maternal condition are associated with elevated HPA activity in offspring, which can last into adulthood for some individuals. Therefore, much of what we know about maternal effects on cortisol regulation in long-lived mammals is derived from studies of manipulated and/or extreme maternal circumstances.

In our study, we investigate the relative contributions of environmental, genetic, and non-genetic maternal effects (hereafter maternal effects) to variation in cortisol phenotypes in wild chimpanzees. Chimpanzees are a long-lived species, have a gestation period of approximately 8 months³⁵, and a prolonged immature dependency lasting at least 10 years³⁶, in which there is emerging evidence of maternal influences in growth, social development, survival, and future reproductive success³⁷⁻⁴⁰. Chimpanzees live in societies with a high degree of fission-fusion dynamics⁴¹, and adults have relatively stable social phenotypes across years⁴², with certain adult females, and thus mothers, consistently more gregarious and social than other individuals⁴³. Maternal social characteristics are thus likely to be a key factor shaping the social environment of their offspring prior to adulthood. Therefore, during both pre- and post-natal phases, there is a long period in which maternal factors can shape endocrine phenotypes that may endure throughout adulthood in chimpanzees.

Using a dataset of 170 adult and immature individuals of both sexes from five different communities and two subspecies (western, *Pan troglodytes verus* and eastern, *Pan troglodytes schweinfurthii*), we applied well-established methods and mixed-effect models to partition variance and calculate the repeatability and heritability of cortisol levels in wild chimpanzees⁴⁴,⁴⁵. Repeatability coefficients allow us to quantify the level of individual variation in cortisol levels and thus whether it could be subject to selection⁴⁴, while heritability estimates indicate the relative contributions of environmental, parental and/or genetic factors in generating individual variation in this trait⁴⁵.

Trait repeatability is defined as the proportion of variance in a trait, here cortisol levels, explained by consistent individual differences⁴⁴. In many wild animal populations, environmental heterogeneity can increase within-individual variation in GC levels and mask between-individual differences and thus trait repeatability⁸,⁴⁶⁻⁴⁸. As a consequence, more recent studies have begun to focus on the degree to which individuals vary in GC secretion in response to environmental gradients, i.e. GC reaction norms¹³,⁴⁹,⁵⁰. Under this framework, reaction norm repeatability refers to the proportion of variance explained by individual differences in average responses to the environment (reaction norm intercept) and in plasticity to the environment (reaction norm slope)⁵⁰. Thus, heritability estimates of reaction norm intercepts and slopes reflect the relative contributions of environmental, parental and/or genetic factors in shaping average responses and plasticity to the environment respectively⁵¹,⁵². It is important to note that heritability estimates only reflect environmental/genetic/parental contributions to *among-individual* variation, i.e. a trait can have a genetic basis, for example, and a heritability estimate of 0 if the trait lacks variation in a population⁵³.
<table><caption>Table 1 Summary statistics for final dataset used in the study.</caption><thead><tr><th></th><th>N individuals</th><th>N samples</th><th>Mean (±SD) N of samples per subject</th></tr></thead><tbody><tr><td>All</td><td>170</td><td>6123</td><td>36.02 (±48.17)</td></tr><tr><td>Adult males</td><td>48</td><td>3243</td><td>67.56 (±79.97)</td></tr><tr><td>Adult females</td><td>69</td><td>1742</td><td>23.86 (±19.72)</td></tr><tr><td>Immature males</td><td>37</td><td>545</td><td>17.03 (±16.58)</td></tr><tr><td>Immature females</td><td>32</td><td>593</td><td>15.95 (±11.09)</td></tr><tr><td>By pedigree</td><td></td><td></td><td></td></tr><tr><td>Mothers with offspring in dataset</td><td>19</td><td>648</td><td>34.11 (±24.20)</td></tr><tr><td>Fathers with offspring in dataset</td><td>11</td><td>977</td><td>88.82 (±77.03)</td></tr><tr><td>Offspring with only their mother sampled</td><td>31</td><td>1335</td><td>43.06 (±51.26)</td></tr><tr><td>Offspring with only their father sampled</td><td>9</td><td>425</td><td>47.22 (±76.00)</td></tr><tr><td>Offspring with both parents sampled</td><td>33</td><td>1096</td><td>33.21 (±41.42)</td></tr><tr><td>Individuals with only maternal half siblings in dataset</td><td>18</td><td>924</td><td>51.33 (±58.59)</td></tr><tr><td>Individuals with only paternal half siblings in dataset</td><td>28</td><td>699</td><td>24.96 (±22.04)</td></tr><tr><td>Individuals with full siblings in dataset</td><td>2</td><td>135</td><td>67.50 (±7.78)</td></tr><tr><td>Individuals with both maternal & paternal half siblings in dataset</td><td>31</td><td>1467</td><td>47.32 (±58.23)</td></tr><tr><td>Individuals without relations in dataset</td><td>62</td><td>1928</td><td>31.10 (±48.20)</td></tr><tr><td>By Population-group</td><td></td><td></td><td></td></tr><tr><td>Tai-East</td><td>33</td><td>1531</td><td>46.39 (±72.61)</td></tr><tr><td>Tai-North</td><td>24</td><td>842</td><td>35.08 (±28.92)</td></tr><tr><td>Tai-South</td><td>51</td><td>2470</td><td>48.43 (±56.58)</td></tr><tr><td>Budongo-Sonso</td><td>45</td><td>1171</td><td>24.40 (±17.82)</td></tr><tr><td>Budongo-Waibira</td><td>17</td><td>109</td><td>7.79 (±3.34)</td></tr></tbody></table>

In total, 6123 urinary cortisol values from 170 individuals were included in the study. Note that certain individuals fall into several pedigree categories (e.g. an individual can be a father and have a maternal or paternal sibling), therefore, the number of individuals in pedigree categorization exceeds 170. The range of numbers of years of sampling of individuals in the dataset was 1-13 years, with a mean ± SD of 2.63 ± 3.01 years.

In chimpanzees, as well as humans, the circadian cortisol response is a well described reaction norm: levels rise gradually during sleep prior to a peak upon awakening, followed by declines throughout the day⁵⁴,⁵⁵. Across numerous chimpanzee cortisol studies, time of day (i.e. circadian rhythm) is one of the most consistent environmental predictors of cortisol levels³⁰,⁴⁹,⁵⁴,⁵⁶⁻⁵⁸, making it a promising reaction norm to investigate in terms of repeatability and heritability. In our study, we take a two-step approach, first establishing repeatability in circadian reaction norms, then examining heritability contributions to individual variation in these reaction norms. Chimpanzees are an interesting study species for this topic; although sampling across the lifespan is challenging for this long-lived mammal, many of the socio-ecological factors influencing variation in cortisol levels in this species are established⁵⁶,⁵⁷,⁵⁹⁻⁶². Therefore, we can account and control for these factors in our statistical models, providing robust estimates of the relative contributions of genetic, maternal, and environmental effects to cortisol levels and circadian reaction norms in a wild, long-lived mammal with prolonged development and maternal care.

Given the prolonged maternal dependency observed in chimpanzees³⁷⁻⁴⁰, coupled with evidence of genetic regulation of circadian cortisol responses in humans¹⁴⁻¹⁷, we anticipated both genetic and non-genetic maternal effects to make substantial contributions to variation in cortisol patterns in wild chimpanzees.

## Results

Urine and fecal samples were collected from individuals of all life stages (2–53 years old) from five chimpanzee communities. For each urine sample (n = 6123 samples), we quantified cortisol levels using liquid chromatography-tandem mass spectrometry (LCMS⁶³; and corrected for variation in water content in the urine using the specific gravity (SG) of each sample⁶⁴. Therefore, we report urinary cortisol levels as ng cortisol/ml SG. From the fecal samples, we genotyped DNA extracts using a two-step amplification method including 19 microsatellite loci (per⁶⁵).

In combination with behavioral observations of mother-offspring dyads, these genotypes allowed us to generate a pedigree containing 159 named mothers and 50 named fathers; 310 offspring had known mothers and 185 offspring had both known mothers and fathers. Following stringent criteria to measure circadian cortisol responses (see below), we included 170 individuals from this pedigree in our final dataset. Table 1 describes sampling by pedigree and group. In total, there were 64 mother-offspring and 42 father-offspring pairs sampled. Figures S1 and S2 illustrate the pedigree for individuals with urinary cortisol values in our study.

**Repeatability.** We used linear mixed-effect models (LMMs) with a Gaussian error structure to test adjusted repeatability in urinary cortisol concentrations, i.e. the proportion of variance attributable to between-individual differences given conditional effects⁴⁴,⁶⁶. Our key predictor of urinary cortisol concentrations (log transformed to achieve a symmetrical distribution) was time of day, which we converted into a continuous, hours-since-midnight value for each sample.

For our repeatability analysis, we fitted three models with identical responses and fixed effects but varying random effect structures (see Table 2 and “Methods” for full justifications of variables included). The *null* model included only the following random effects: a factor variable to account for variation in socioecology within groups (“group”), a factor to account for temporal variation within groups composed of group identity and the sampling year (termed “group-year”), and a variable to account for samples being pooled from various research projects (“project identity”). For the latter, although all projects follow the same protocol for sample collection and analysis, different projects may have different priorities for the individuals or contexts sampled, therefore, this random effect was included to account for such biases.

The *individual intercepts* model added random intercepts for individual identity and a dummy variable composed of individual identity and the sampling year (termed “ID-year”; used to
<table><caption>Table 2 Structures of main models examining the repeatability and heritability of urinary cortisol levels and reaction norms in wild chimpanzees.</caption><thead><tr><th>Model</th><th>Response</th><th>Fixed effects</th><th>Random effects &amp; slopes</th><th>Model purpose</th></tr></thead><tbody><tr><td>Null model</td><td rowspan="2">Urinary cortisol concentrations (ng/ml SG; log transformed)</td><td>- Demographic (five levels: adult male, cycling female, lactating female, juvenile female) × time of day</td><td>(1 group)+</td><td rowspan="2">Reference model to compare to random intercept and reaction norm models</td></tr><tr><td>Individual intercepts model</td><td>- Demographic (five levels: adult male, cycling female, lactating female, juvenile male, juvenile female) × time of day<sup>2</sup></td><td>(1 group)+</td></tr><tr><td rowspan="2">Individual intercepts model</td><td>- Age at sample × time of day<sup>2</sup></td><td>(1 group)+</td><td rowspan="2">To identify the contribution of consistent individual differences in average cortisol levels (random intercepts) to overall variation in cortisol levels</td></tr><tr><td>- Age at sample × time of day<sup>2</sup></td><td>(1 group)-<br>(1 project identity)+</td></tr><tr><td rowspan="2">Individuals reaction norms model</td><td>- Seasonality × time of day</td><td>(1 individual identity)+</td><td rowspan="2">To identify the contribution of consistent individual differences in plasticity to circadian effects (random slopes) to overall variation in cortisol levels</td></tr><tr><td>- Seasonality × time of day<sup>2</sup></td><td>(1D-year)</td></tr><tr><td rowspan="2">Individuals reaction norms model</td><td>- Adult male-to-adult female ratio × time of day</td><td>(1 group)+</td><td rowspan="2">To identify the contribution of mother identity and pedigree (genetics) to overall variation in cortisol levels (heritability analysis)</td></tr><tr><td>- Adult male-to-adult female ratio × time of day<sup>2</sup></td><td>(1 group)-<br>(1 project identity)+</td></tr><tr><td rowspan="2">Heritability animal model</td><td>- Community size × time of day</td><td>(time of day + time of day<sup>2</sup> | individual identity)+</td><td rowspan="2">To determine the contribution of mother identity and pedigree (genetics) to overall variation in cortisol levels (heritability analysis)</td></tr><tr><td>- Community size × time of day<sup>2</sup></td><td>(time of day + time of day<sup>2</sup> | individual identity)+</td></tr><tr><td rowspan="2">Heritability animal model</td><td>- LCMS method (two levels: new, old) × time of day</td><td>(time of day + time of day<sup>2</sup> | group)+</td><td rowspan="2">To determine the contribution of mother identity and pedigree (genetics) to overall variation in cortisol levels (heritability analysis)</td></tr><tr><td>- LCMS method (two levels: new, old) × time of day<sup>2</sup></td><td>(time of day + time of day<sup>2</sup> | group-year)+</td></tr></tbody></table>

All models were tested using 6123 urinary cortisol values from 170 individuals.

compare within-year and between-year trait repeatability in urinary cortisol concentrations, see below). Lastly, the *individual reaction norms* model was identical to the *individual intercepts* model other than it included random slopes for the time of day within the random effects of individual identity and ID-year. Previous research found higher repeatability for the quadratic term of time of day in our study populations⁴⁹; therefore, we included time of day as both linear and quadratic terms to model the potential circadian responses.

In all these repeatability models, we included as fixed effects variables previously shown to influence urinary cortisol levels (see Table 2 and “Methods” for full details). In order to best model the circadian response of cortisol levels, we included all fixed effects in interaction with the linear and quadratic terms of time of day.

We used a model comparison approach and leave-one-out cross validation⁶⁷ to examine whether the addition of random intercepts for individual identity (*individual intercepts model*) or random slopes for linear and quadratic effects of time of day (*individual reaction norms model*) improved the predictive power of each model. This would indicate whether individual differences in average cortisol levels or individual differences in cortisol plasticity to time of day, respectively, explained variation in cortisol levels well. We found strong support for the inclusion of the random intercepts for individual identity, but weak support for the inclusion of random slopes within-individual identity: in most model comparisons, the *intercepts only* models were preferred to the *reaction norm* models (Table S1), but with typically marginal differences in the expected predictive density. Given that our research interest lies both in the average cortisol levels and the circadian reaction norms, we included random slopes within-individual identity in our subsequent analyses.

Using established formulas for partitioning and comparing variances (see “Methods” for full details and equations⁴⁹,⁵¹,⁵²), from the *individual reaction norms* model, we calculated a within-year (i.e. short-term) trait repeatability estimate (variance explained by the ID-year variable) of 0.07 (95% credible intervals = 0.01, 0.13; Table 3) and a between years (i.e. long-term) trait repeatability estimate (variance explained by individual identity) of 0.04 (95% credible intervals = 0.01, 0.07; Table 3). We found substantial support for consistent individual differences in circadian reaction norm intercepts, i.e. average cortisol levels given the effect of time of day, with a reaction norm intercept repeatability estimate of 0.53 (95% credible intervals = 0.34, 0.69; Table 3). The mean reaction norm repeatability estimates for the linear and quadratic time of day slopes, 0.17 and 0.28 respectively, suggested a substantial proportion of variance in these phenotypes are attributed to individual differences. However, these estimates were associated with a large amount of uncertainty, with the lower credible intervals of both slopes close to 0.

The apparent lack of between-individual differences in circadian slopes was unexpected given the strong evidence for consistent individual differences in this phenotype in a previous study of adult male chimpanzees, a dataset which included individuals in our present study⁴⁹. Therefore, to examine if the inclusion of adult females and immatures in our dataset contributed to uncertainty to our reaction norm repeatability slope estimates, we ran repeatability analyses for each separate demographic (adult males, adult females, immatures). The model structures were identical for each demographic with the exceptions that a continuous variable for dominance rank was included in the male model, a categorical variable (lactating or cycling) for reproductive status was included in the adult female model, and a categorical variable indicating sex was included in the immature model (we did not include dominance rank for the female and immature models due to insufficient dominance information for many individuals in these demographics; see
<table><caption>Table 3 Repeatability coefficients (with 95% credible intervals) from reaction norm models quantifying circadian cortisol responses in wild chimpanzees.</caption><thead><tr><th>Demographic</th><th>Coefficient</th><th>Estimate</th><th>(ICI, uCI)</th></tr></thead><tbody><tr><td rowspan="5">All individuals combined</td><td>Within-year trait repeatability</td><td>0.08</td><td>0.01, 0.13</td></tr><tr><td>Between years trait repeatability</td><td>0.04</td><td>0.01, 0.07</td></tr><tr><td>Reaction norm repeatability for intercepts</td><td>0.53</td><td>0.34, 0.69</td></tr><tr><td>Reaction norm repeatability for linear slope</td><td>0.17</td><td>0.00, 0.75</td></tr><tr><td>Reaction norm repeatability for quadratic slope</td><td>0.28</td><td>0.00, 0.94</td></tr><tr><td rowspan="5">Adult males</td><td>Within-year trait repeatability</td><td>0.06</td><td>0.01, 0.11</td></tr><tr><td>Between years trait repeatability</td><td>0.02</td><td>0.01, 0.03</td></tr><tr><td>Reaction norm repeatability for intercepts</td><td>0.40</td><td>0.10, 0.73</td></tr><tr><td>Reaction norm repeatability for linear slope</td><td>0.26</td><td>0.00, 0.89</td></tr><tr><td>Reaction norm repeatability for quadratic slope</td><td>0.27</td><td>0.00, 0.95</td></tr><tr><td rowspan="5">Adult females</td><td>Within-year trait repeatability</td><td>0.05</td><td>0.00, 0.11</td></tr><tr><td>Between years trait repeatability</td><td>0.04</td><td>0.00, 0.10</td></tr><tr><td>Reaction norm repeatability for intercepts</td><td>0.85</td><td>0.57, 0.99</td></tr><tr><td>Reaction norm repeatability for linear slope</td><td>0.46</td><td>0.00, 0.99</td></tr><tr><td>Reaction norm repeatability for quadratic slope</td><td>0.42</td><td>0.00, 0.98</td></tr><tr><td rowspan="5">Immatures</td><td>Within-year trait repeatability</td><td>0.10</td><td>0.01, 0.23</td></tr><tr><td>Between years trait repeatability</td><td>0.04</td><td>0.00, 0.11</td></tr><tr><td>Reaction norm repeatability for intercepts</td><td>0.43</td><td>0.00, 0.77</td></tr><tr><td>Reaction norm repeatability for linear slope</td><td>0.25</td><td>0.00, 0.80</td></tr><tr><td>Reaction norm repeatability for quadratic slope</td><td>0.18</td><td>0.00, 0.69</td></tr></tbody></table>

Repeatability coefficients were calculated across all individuals (n = 170), then within the specific demographics of adult males (n = 46), adult females (n = 69), and immatures (n = 69). Note that certain individuals (n = 14) appear both as adults and immatures in the overall dataset.

"Methods" for details). In the Supplementary Materials Figs. S3-S5 illustrate the circadian cortisol responses for each demographic and Tables S2-S9 provide the model summaries for the fixed and random effects of the *individual reaction norm* models of each demographic. For all demographics, we still observed a high amount of uncertainty for our reaction norm repeatability slope estimates (Table 3). Consistent with Sonnweber et al.⁴⁹, across and within demographics we generally found strong support for consistent individual differences in reaction norm intercepts. The reaction norm repeatability intercept estimates for adult males and females were clearly non-zero (Table 3); for immatures, although the estimate was high (0.43), the CI range was very wide, suggesting uncertainty.

**Heritability.** We estimated the heritability of urinary cortisol levels and circadian cortisol responses by implementing the well-established "animal model" approach⁴⁵, which estimates additive genetic variance and parental effects in a trait by partitioning variance in mixed-effect models. Our animal model was similar in structure to the *individual reaction norms* model (see Table 2), with the major exceptions being the inclusion of the pedigree as a random effect to estimate additive genetic variance²⁸,⁴⁵. In addition, to partition the relative contribution of maternal effects (the main caregiver), we also included the identity of the mother of the individual sampled as a random effect. For this model, we also included random slopes for the linear and quadratic terms of time of day within all random effects (including project identity and group-year).

To ensure that we could effectively model heritability with the data available to us, we fitted three main different animal models. First, we fitted a full animal model using all the urinary cortisol values available to us (*Full heritability model*; 6123 samples from to 170 individuals). Second, to ensure any environmental or genetic effects were not an artifact of pooling samples from different populations and subspecies of chimpanzees, we fitted a model only including individuals sampled in the *Tai* forest (*Tai* heritability model; 4843 samples belonging to 111

individuals). Lastly, in male and female chimpanzees respectively, there tends to be a positive and negative correlation between dominance rank and GC levels⁶⁸,⁶⁹, which should ideally be included in models to accurately model individual variation in cortisol levels. However, due to limited behavioral data for certain individuals (see "Methods"), we could not assign ranks to all individuals in the dataset. Therefore, we ran a third heritability model including only individuals to which we could assign ranks (*Dominance heritability model*; n = 5691 samples from 141 individuals).

For each of these models, having accounted for the influence of the fixed effects (see Table 2), we computed the proportion of variance attributable to *genetics* (calculated as variance explained by the pedigree), *maternal effects* (variance explained by maternal identity), and *shared community effects* (variance explained by the group variable). In addition to these factors related to heritability, we also calculated the proportion of variance attributable to temporal within-group factors (variance explained by the group-year variable), individual identity over the long-term (variance explained by individual identity), and the short-term (variance explained by the ID-year variable). For all these factors, we calculated the proportion of variance they explained for each component of the circadian reaction norm, i.e. average cortisol levels (intercepts) and cortisol responses to the linear and quadratic terms for time of day (*sensu*⁵¹,⁵²). We also estimated the proportion of covariance between intercept, linear slope, and quadratic slopes explained by all these factors. Finally, we implemented a variation of the *Full heritability model*, referred to as *Trait heritability model*, in which the linear and quadratic circadian slopes were not present so that heritability could be calculated including the residual variance⁵¹,⁵².

The relative contribution of our random effects to variation in circadian cortisol responses in wild chimpanzees from the *Full heritability model* are shown in Fig. 1, with a summary of the maternal and genetic effects in Table 4 (full details of all variance components are in Table S10 of the Supplementary Materials). Most of the variation in our models was explained by long-term inter-group differences (96.9%, credible intervals = 87.1, 99.2%),
<figure><img src="image_4.png" /><figcaption>**Fig. 1** Estimates for the proportion of variance among the random effects in our model examining variation in circadian cortisol responses in wild chimpanzees. **a** Proportion of variation explained by between-group versus within-group factors. **b** Proportion of the within-group variation explained by different factors. For both plots, the posterior distribution of the proportion of explained variance is shown as violin plots, with interquartile ranges represented by boxplots. The horizontal dashed line marks a proportion of within-group variance of 1%.</figcaption></figure>

<table><caption>**Table 4** Summary of genetic, maternal, shared community group-year, individual-year and individual effect estimates (with 95% credible intervals) on circadian cortisol responses in wild chimpanzees.</caption><thead><tr><th rowspan="2">Coefficient</th><th colspan="2">Intercept</th><th colspan="2">Linear slope</th><th colspan="2">Quadratic slope</th></tr><tr><th>Estimate</th><th>(ICI, uCI)</th><th>Estimate</th><th>(ICI, uCI)</th><th>Estimate</th><th>(ICI, uCI)</th></tr></thead><tbody><tr><td>Proportion of variance in components of circadian urinary cortisol reaction norms</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Between-group effects</td><td><strong>0.97</strong></td><td><strong>(0.87, 0.99)</strong></td><td>0.63</td><td>(0.01, 0.98)</td><td>0.15</td><td>(0.00, 0.85)</td></tr><tr><td>(Shared community effects)</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Within group effects</td><td><strong>0.03</strong></td><td><strong>(0.01, 0.13)</strong></td><td>0.37</td><td>(0.02, 0.99)</td><td>0.85</td><td>(0.15, 1.00)</td></tr><tr><td>Proportion of within-group variance</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Genetic effects</td><td>0.01</td><td>(0.00, 0.05)</td><td>0.05</td><td>(0.00, 0.38)</td><td>0.04</td><td>(0.00, 0.31)</td></tr><tr><td>Maternal effects</td><td><strong>0.08</strong></td><td><strong>(0.01, 0.16)</strong></td><td>0.09</td><td>(0.00, 0.49)</td><td>0.03</td><td>(0.00, 0.29)</td></tr><tr><td>Group-year effects</td><td><strong>0.74</strong></td><td><strong>(0.62, 0.83)</strong></td><td>0.40</td><td>(0.01, 0.84)</td><td>0.36</td><td>(0.01, 0.84)</td></tr><tr><td>Individual identity effect</td><td>0.02</td><td>(0.00,0.10)</td><td>0.05</td><td>(0.00,0.41)</td><td>0.04</td><td>(0.00,0.35)</td></tr><tr><td>ID-year effect</td><td><strong>0.13</strong></td><td><strong>(0.08, 0.21)</strong></td><td>0.17</td><td>(0.00, 0.70)</td><td>0.36</td><td>(0.01, 0.84)</td></tr></tbody></table>

Each coefficient represents a different component of the circadian cortisol response.

Coefficients in bold had genetic/maternal/group_year/ID_year/individual identity effect contributions with 95% intervals distinguishable from 0%, i.e. either with a credible interval larger or equal to 1%, or significantly higher than 0 according to the dataset permutation (Fig. 2). Italicized coefficients are those with lower credible intervals larger or equal to 1% yet associated with a high degree of uncertainty (interval range exceeds 80%).
<figure><img src="image_5.png" /><figcaption>**Fig. 2** Comparison of genetic and maternal within-group variance estimates obtained from observed versus permuted data. Median proportion of variance estimates obtained from the observed data are represented by dashed vertical lines; histograms represent the counts of each estimate value from 100 permutations. In this permutation analysis, the proportion of variance calculations includes all random effects, including our technical predictor, "project identity". Our final reported maternal effect estimate is higher than presented here as we consider only the biological predictors in that calculation. Figure S6 in the supplementary materials illustrates the permutations of all variance components in our heritability model.</figcaption></figure>

particularly for the average cortisol levels, while the contribution of this predictor was less overwhelming and associated with high degree of uncertainty for circadian changes in cortisol (quadratic slope variance = 14.5%, credible intervals = 0.0, 85.4%). Maternal and genetic effects explained very little of the overall variation in cortisol, particularly for the average cortisol levels, however, when focusing on variation *within groups* only, maternal effects explained 8.3% (credible intervals = 1.2, 16.3%) of the average cortisol variation, while the genetic contribution was distinguishable from zero.

Similar estimates were obtained in the *Taï* and *Dominance heritability models* (Tables S11 and S12, Figs. S6–9). Both of these sub-analyses were informative about the results of our main model. Firstly, the strong contribution to variance of group in the *Taï* model confirmed that shared community effects were not the results of pooling results across two populations of chimpanzees. Meanwhile, the inclusion of dominance rank in the *Dominance heritability model* gave comparable results, with maternal effects higher than genetic effects, although the size of the maternal effect estimate was reduced to ~5% (Supplementary Table S12). This similarity in findings suggests that rank alone cannot fully explain the maternal effect observed in our main model.

Note, the credible intervals of our genetic and maternal effect estimates indicate a large degree of uncertainty (see Table 4). In addition, their values are bound to be positive as they were derived from the variance components of the random effects in the animal model. Hence, to assess whether maternal and genetic factors determine detectable non-zero effects and to test whether the differences between their variances could be due to chance, we performed re-sampling of the data and calculated the proportion of cases in which estimates were higher than for the observed data (i.e. false positives). Specifically, we reshuffled the identities of the individuals within their communities (and thus maintaining control of group-level environmental and social

factors) 100 times in the additive genetic matrix. Individuals newly classified as siblings after the permutation of the genetic matrix, were assigned to the same mother in the predictor "maternal identity", so that genetic relationships and maternal effects were always concordant. By doing this, we obtained permutations of the data that simulated genetic and maternal relationships expected by chance, while leaving unaltered the effects of all other predictors, keeping the same structure in the additive genetic matrix, and the same distribution of maternal relationships among individuals.

For the maternal effect on the intercepts (average cortisol levels), only one permutation out of 100 had estimates lower than the observed data (Fig. 2), while for the linear and quadratic slopes for time of day (cortisol circadian response), 14 and 0% of the permutations showed higher or equal values than the observed. This suggests that almost certainly the observed effects on the intercept and quadratic slope cannot be explained by chance and confirm a non-zero contribution of maternal effects to the cortisol phenotypes of wild chimpanzees.

We also used permutations to test whether the result that a higher proportion of within-group variance was explained by maternal rather than genetic effects could occur by chance. Only 1% of the permuted datasets and models generated a higher difference in variance estimates for maternal and genetic effects on average cortisol levels (i.e. intercepts) than that identified using our observed data and the *Full heritability model* (Fig. 3). Similar permutation results were also obtained for the *Taï* and *Dominance heritability models* (Figs. S10 and S11), as well as for a *Trait heritability model* (Table S13; Figs. S12–14), supporting the robustness of our results.

We conclude that the maternal environment is more influential than genetics in shaping cortisol responses in wild chimpanzees, while shared community effects are the clearest influence on this specific phenotype overall.
<figure><img src="image_6.png" /><figcaption>**Fig. 3** Differences in variance in cortisol phenotypes explained by maternal and genetic factors. Estimates of the difference in the proportion of within-group variance explained by the maternal effect and that explained by genetic factors in the observed data (dashed line) and in 100 permutations of the data (histogram).</figcaption></figure>

Discussion

Our study leverages up to 18 years of long-term data collection of more than 6000 urine samples from 170 individuals to identify consistent individual differences in circadian cortisol responses in wild chimpanzees. Using this unique dataset, we find that group-wide, socioecological effects, represented by the “group” random effect in our models, have the most pronounced influence on variation in cortisol levels in this species. These effects held even when examining contiguous chimpanzee communities. Despite this predominant impact of socioecology, we were able to discern a significant role for the maternal environment in shaping average cortisol levels among individuals, with limited evidence for genetic effects alone driving individual differences. Our results were robust to different model structures and are corroborated by permutations of the data which indicate our maternal and genetic effect estimates are not artifacts of group structures. Further, the shared community effects cannot be explained by pooling samples from different populations and subspecies of chimpanzee, nor by established group-level predictors of cortisol such as group size or sex ratios. Our study shows the importance of long-term data collection in the wild, especially for long-lived species with protracted maternal care. It also raises important biological questions about the nature of both the macroenvironmental shared community effects and microenvironmental, non-genetic maternal effects that we documented, which combined accounted for virtually all variation, conditional on our fixed effect structure, in average cortisol levels in chimpanzees.

In our study, while much of the variation in urinary cortisol levels was attributable to long-term group effects, short-term group-level (“group-year” random effect) and individual-level (“ID-year” random effect) factors had a strong influence on cortisol phenotypes. These short-term effects illustrate the flexibility of this physiological phenotype in wild animals but also raise an interesting phenomenon of group-level, shared experience of temporal variation in cortisol levels in chimpanzees. In a similar recent study, heritability estimates for microbiome traits in a population of wild baboons (*Papio cynocephalus* and *anubis*) varied considerably within and between years based on seasonal dynamics and diet variation, highlighting the susceptibility of phenotypic variance, and thus heritability estimates, to shared environmental factors⁷⁰.

In chimpanzees, potential group-level stressors include food availability⁶², dominance hierarchy instability⁵⁷,⁶⁸, disturbance from neighboring communities of conspecifics⁵⁸, and disease outbreak⁷¹. The latter is unlikely to explain our finding as we excluded samples from individuals showing signs of illness (see “Methods”). However, we cannot exclude the possibility that the long-term community differences we observe in our study are in part driven by hangovers from extreme events, such as periods of high mortality from disease. Social bonds are key for cooperation in chimpanzees⁷² and losing keystone individuals within cooperation networks could lead to long-term reduced within-group cohesion⁷³, in turn affecting cortisol levels across the entire group⁷⁴. Instability could also arise if there are frequent switches in positions in dominance hierarchies and male rank instability has been shown to impact urinary cortisol concentrations in male Taï chimpanzees⁵⁷. In most cases periods of rank instability tend to be short, lasting weeks or months rather than years, and would not necessarily explain the long-term group differences in cortisol levels in our study. Instead, social connectivity and social dynamics beyond rank may influence differences in group-level stress. We found a negative correlation between community size and cortisol levels (see Tables S2 in the Supplementary Materials). This association could be explained by the fact that although smaller communities may suffer more from inter-community competition⁷⁵, they could benefit from reduced within-community competition and improved cohesion and stability, as compared to larger communities in which individuals may struggle to maintain broad social networks⁷⁶. One future avenue of research could focus in more detail on community differences in demographics and social cohesion as explanatory variables for the group-level differences driving cortisol variation in wild chimpanzees.

Regarding food availability and associated competition, the Taï communities are adjacent to one another, with relatively little between-group variation in the availability of food (see Fig. S15 for an illustration of between-group differences in urinary cortisol concentrations and food availability⁷⁷). Therefore, we can tentatively discount this factor as the primary driver explaining between-group differences in cortisol levels. Chimpanzees are a highly territorial species⁷⁸, and the incorporation of more fine-scale behavioral data regarding competitive factors, e.g. rates of
incursion from neighboring communities⁵⁸,⁷⁵, will also be bene-
ficial in future studies on between-group variation in cortisol levels.

Decomposing the specific source(s) of group-level stressors in
our dataset is an interesting and important avenue of future
research. As average cortisol levels are predictive of survival⁹,¹²,
and between-group factors explain much of the variation in
cortisol levels in our dataset, understanding the causes of group-
level variation in cortisol levels may highlight risk factors for the
long-term viability of certain chimpanzee communities or
populations. More broadly, unlike most human studies to date,
our focus on chimpanzees allowed us to fit highly robust models
in terms of incorporating known socioecological predictors of
cortisol levels in this species⁵⁷⁻⁵⁹,⁶¹,⁶²,⁶⁸. Furthermore, using a
long-term dataset allowed us to examine cortisol levels both
cross-sectionally and longitudinally, something often not possible
in human research¹⁸,²¹,²⁷. Therefore, our finding that
community-level shared socioecology was the major predictor of
cortisol levels in chimpanzees has some broader implications for
our understanding about physiological plasticity in social, long-
lived species, including humans.

Our results suggest a diminished role for heritable factors in
shaping cortisol phenotypes for long-lived species. Remarkably,
genetic factors had an even lesser role than the small but
detectable effect of the maternal environment. In this species,
males are the natal sex, while females typically disperse only once
in their lifetime during adolescence⁸⁰. Therefore, adult chim-
panzees are socially bound to their communities, within which
they exhibit complex within-group cooperation⁷²,⁷⁸,⁸¹⁻⁸³, in part
to facilitate effective out-group directed aggression and in-group
defense⁷⁸. Although human cooperative tendencies can extend
beyond an individual's immediate community, cooperation
remains partially constrained by in-group favoritism, which can
lead to substantial between-group competition⁸⁴. In some recent
human studies, community-level differences in stress exposure
have been related to community-level variation in social
inequality and culture⁸⁵,⁸⁶. These community-level discrepancies
in the experience of social or physiological stressors were further
illuminated by the covid-19 pandemic⁸⁷. Our results suggest that
community-level approaches to reducing excessive exposure to
stressors could be more effective than approaches targeting single
individuals, both in our closest living ancestors, and possibly in
humans and other long-lived species.

Given the strong contribution of individual- and group-level
temporal effects on variation in cortisol levels, it is notable that
we were able to identify such a clear maternal effect on indivi-
dual differences in our study, a key aim of our study. Although
absence of evidence is not evidence of absence, the lack of a clear
genetic effect in our results at least indicates a qualitatively
stronger influence of maternal identity in shaping cortisol
phenotypes in our study population. In a recent meta-analysis,
Moore et al.²⁸ found a limited role for parental care in shaping
the strength of parental effects on trait variation. However, as far
as we are aware, few species included in the study demonstrate
the prolonged mother-offspring association observed in chim-
panzees. We hope that our results will encourage studies in
other animals with protracted developmental phases or maternal
associations to compare and contrast the relative influence of
mothers and genetic inheritance. As with the macroenviron-
mental socioecological effects identified, determining the spe-
cific mechanism leading to the observed maternal effect merits
further study, with factors such as protracted maternal care,
epigenetic processes, or shared experience of stressors being
possible explanations²⁹,⁸⁸,⁸⁹. In wild chimpanzees, although
maternal loss impacts later life reproductive success³⁷, there is
no evidence that this is the result of long-term HPA axis activity
alteration as effects on circadian cortisol patterns following

maternal loss do not endure into adulthood³⁰. This time-limited
nature of alteration of the HPA axis activity suggests that effects
of adversity, and potentially maternal effects, are not explained
by epigenetic mechanisms.

Chimpanzee offspring associate almost permanently with their
mothers until around the age of 12 years⁹⁰, therefore, maternal
social phenotype is the key determinant of the social environment
of immature offspring. Previous research suggests maternal
dominance status influences fecal GC levels in male, but not
female immature chimpanzees⁹¹, therefore, status alone is unli-
kely to explain the full extent of the maternal effect identified in
our study (indeed we conducted a supplementary analysis for
individuals to which we could assign dominance rank, suggesting
some influence of dominance rank, but with a clear non-zero
maternal effect independent of rank; see “Methods” and
Table S12). Chimpanzee mothers can vary in their rates of direct
social interactions with their offspring, i.e. demonstrate unique
maternal styles⁹². Captive rodent studies show that rates of
maternal affection can influence the regulation of the stress
response in offspring, even inducing DNA methylation of GC
receptor promoter regions²⁹,³¹,³⁴. Chimpanzee females also have
distinct social phenotypes⁴². Therefore, the offspring of different
mothers will have very different exposures to social behaviors and
social partners. However, it is an open question whether these
differences in exposure translates into variable learning of tech-
nical or social skills, such as extractive foraging⁹³, inheriting
certain social relationships or components of their mother’s social
networks⁸³, as well as being primed to be more or less
aggressive⁴². These social competitive factors may, in turn,
influence HPA axis activity via nutritional or social stressor
exposure⁵⁹,⁹⁴,⁹⁵.

In our study we find that the contributions of heritable, and
particularly genetic, factors to cortisol phenotypes were low as
compared to values reported in other analyses, such as human
twin studies in which maternal and environmental effects cannot
typically be measured (as highlighted in ref. ¹⁵), or experimental
animal studies employing less complex model structures (e.g.
refs. ²³,²⁶). The pedigrees used in these studies vary considerably:
human twin studies often sample between 100–200 twin pairs and
their parents¹⁵, while certain animal studies can have over 1000
individuals within their pedigree (e.g.²⁴). Despite drawing upon
one of the largest datasets of its kind in a long-lived mammal
(both in terms of number of individuals, samples, and years of
study), our pedigree is comparatively small, although not
uniquely so among animal studies (e.g. ref. ²³). Nevertheless,
while the shallow nature of our chimpanzee pedigree can possibly
explain the uncertainty of our estimates, it is unlikely to explain
the reduced heritable contributions identified in our study. In our
model, we included numerous socioecological predictors of cor-
tisol levels in chimpanzees⁵⁷⁻⁵⁹,⁶¹,⁶²,⁶⁸ as well as a random effect
structure that could capture the relative contributions of shared
community, genetic, and maternal effects. Our Bayesian
approach, which allows us to capture uncertainty in our herit-
ability estimates, and our permutation analyses, which suggests
our results are not expected simply because of the structure of our
pedigree, means that the qualitative and relative contributions of
heritable components in our study remain illuminating. Thus,
while in general, it is difficult to compare proportions of variance
between different studies when model structures and complexities
vary substantially⁹⁶, our study points to the fact that analyzing
large datasets, encompassing different and diverse groups, could
be key in revealing the relevance of different ecological condi-
tions, shared community dynamics, and idiosyncratic group
features in determining phenotypic traits. Moreover, based on
results in other species, we do not contend that genetics have no
influence on variation in cortisol in chimpanzees, only that any
genetic effect is challenging to discern due to the clearer role of maternal and group-level socioecological effects. Therefore, previous research, due to methodological limitations in effectively partitioning environmental and maternal effects, may have overestimated the importance of genetics in the formation of cortisol phenotypes in long-lived species.

In our study, we were able to show that average cortisol levels given circadian effects are repeatable across demographics, including adult females in various reproductive states and in immature individuals. However, unlike Sonnweber et al.⁴⁹, we only found strong support for consistent individual differences in average cortisol levels, rather than circadian slopes. This discrepancy is likely due to a combination of three factors. First, we included substantially more samples, individuals, sex, and age classes, despite using stricter criteria for individual inclusion. Second, out of necessity, different corrections for the dilution of the urine samples were used in the two studies (creatinine-corrected urinary cortisol in Sonnweber et al.⁴⁹; specific gravity-corrected urinary cortisol in the current study; see “Methods”). Although urinary cortisol concentrations derived from each of these methods are usually correlated (and are in our dataset, albeit weakly), the ranges of values will be different, which may affect the degree of variation in quantified circadian slopes. Third, our models were inherently more complex in structure (e.g. the number of levels for each random effect and slope), which can make it difficult to compare repeatability between different studies⁹⁶. We expect that our approach, necessary due to the question we are addressing and the size of the dataset, may not be optimal to evaluate the subtlety of individual differences in circadian slopes. Nevertheless, despite this discrepancy with Sonnweber et al.⁴⁹, across both studies, we find clear evidence of consistent individual differences in average cortisol levels, regardless of differences in sample sizes, model complexity, and correction factors used in calculating cortisol concentrations.

To conclude, in our study, the macroenvironment of shared community effects and the microenvironment of maternal effects are the major influences on cortisol variation throughout the lifespan in chimpanzees. The lack of a clear genetic influence on cortisol regulation in chimpanzees was surprising, given the weight of evidence in human twin studies, and suggests caution in interpreting human studies when non-genetic factors such as non-genetic maternal effects or community effects cannot be factored out²². Similar work on other ape populations, including humans, is vital to fully understand the relative contributions of genetics and non-genetic environmental effects on cortisol regulation in this taxon. Indeed, recent studies show that community-level differences in stress exposure are prevalent in human societies⁸⁵,⁸⁶. Our results show that experiences of differing group-specific stress levels may be a common aspect of our evolutionary histories. Overall, determining the precise mechanisms of both maternal and non-maternal community-level influences clearly merits further investigation and will contribute to our understanding of the role of society, parents, and developmental plasticity in shaping physiology in long-lived, social species.

## Methods

**Study site and subjects.** We used long-term behavioral, demographic, and physiological data collected between 2000 and 2018 from two field sites of two sub-species of chimpanzee. In Taï National Park (5° 52' N, 7° 20' E), Côte d'Ivoire, data were collected from three communities of western chimpanzees (East, North, and South⁹⁷); and in Budongo Conservation Field Station, Uganda (2° 03' N, 31° 46' E), data were collected from two communities of eastern chimpanzees (Sonso and Waibira⁹⁸,⁹⁹).

In both Taï and Budongo, data on the chimpanzees are systematically collected by a combination of locally-employed field assistants and visiting researchers. Longitudinal data includes daily counts of group compositions, as well as recording

of behavioral and social interactions using a combination of focal observations and ad-libitum sampling¹⁰⁰. During observations of the chimpanzees, observers opportunistically collected urine and fecal samples from identifiable individuals. In Taï, regular observations of the chimpanzees commenced in 1990 (North, 1990–2018; South, 1999–2018; East, 2007–2018⁹⁷) and regular urine sample collection (see below) commenced in 2000 (North and South, 2000–2018; East, 2003–2018). In Budongo, regular observations of the chimpanzees commenced in 1994 (Sonso, 1994–2018; Waibira, 2011–2018⁹⁸,⁹⁹) and regular urine sample collection commenced in 2005 (Sonso, 2005–2018; Waibira, 2017–2018).

**Urine sample collection and analysis.** We collected urine from identifiable individuals using a plastic pipette to transfer urine from the ground or vegetation into either a 2 ml or 5 ml cryovials. Cryovials were stored in liquid nitrogen once back in camp, typically within 12 h of collection. Frozen samples were transported packed in dry ice to the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany, where they were stored at ≤20 °C in freezers.

We quantified urinary cortisol levels for each sample using LCMS³⁶ and MassLynx software¹⁰¹. We used prednisolone (coded as “old method” in models, i.e. most samples analyzed prior to July 2016⁶³), or testosterone d4 (“new method”, i.e. all samples analyzed post September 2016⁶²) as the internal standards. Samples analyzed using the “new method” tended to have higher urinary cortisol concentrations than those of the “old method”, therefore, we included LCMS methodology as a fixed effect in our statistical analyses (see below). Intra- and inter-batch coefficients of variation for quality controls were 8.29% and 13.59%, respectively.

For each sample, we measured specific gravity (SG) using a refractometer (TEC, Ober-Ramstadt, Germany). SG values were used to correct cortisol measurements for variation in water content in the urine using the formula outlined by Miller et al.⁶⁴:

$$SG_{\text{corrected cortisol}} = \text{raw hormone concentration} \times \frac{(SG_{\text{population mean}} - 1.0)}{(SG_{\text{sample}} - 1.0)}$$

The population means were derived from the samples included in this analysis. The SG population mean was 1.02 for Taï and 1.02 for Budongo.

**Fecal sample collection and pedigree generation.** Fecal samples were collected from identifiable individuals. The samples were collected using plastic bags and then either directly stored in ethanol, dried on silica gel, or using a two-step ethanol-silica method¹⁰². Dried samples were transported in silica to the Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany.

Using these samples, microsatellite genotyping of DNA of 428 individuals (n = 259 for Taï; n = 169 for Budongo) has been conducted since 1999, with an average of 83% complete genotypes at 19 loci. Approximately 100 mg of each sample was extracted using either the QIAamp DNA stool (Qiagen) or the GeneMATRIX Stool DNA Purification (Roboklon) kits. We genotyped DNA extracts using a two-step amplification method including 19 microsatellite loci as detailed previously⁶⁵. Using CERVUS 3.0 software¹⁰³, we compared the resultant genotypes using the ‘identity analysis’ function to confirm individual identities and the ‘parentage analysis’ function to confirm maternities and assign paternities, using confidence assessments of 80 and 95%. In the case of fathers, each of the paternity assignments received a high likelihood, and other potential sires (adult males present in the group at the same time) were excluded by two or more mismatches. In total, were able to reliably assign fathers to 43% of individuals represented in the dataset.

**Data preparation.** To provide an accurate measure of circadian patterns for each individual, we excluded certain samples where cortisol levels were expected to be elevated and not representative of normal circadian patterning. Here, we provide a detailed description of the sample exclusion process.

In female primates, including chimpanzees, cortisol levels vary with reproductive state⁵⁹. Chimpanzee gestation is approximately 240 days¹⁰⁴. Using demography data and the birth dates of offspring, we assigned females to three reproductive states (sensu⁵⁹): pregnant (during the 240 days preceding the birth of any offspring), lactating (the 1095 days [based on average resumption of cycling in the population] subsequent to the birth of any offspring) and cycling (any other period of time when females were not assigned as pregnant or lactating). We included all adult female samples where we were able to assign reproductive state to the female at the time of sampling. Furthermore, following related studies⁵⁶,⁵⁹, we excluded samples from pregnant females because cortisol levels tend to increase during pregnancy. In fact, interactions can occur between maternal and fetal HPA axes making it difficult to accurately determine maternal cortisol levels in isolation¹⁰⁵.

In immature chimpanzees (<12 years old), maternal separation elevates cortisol secretion and has short-term effects on cortisol circadian patterns³⁰. Therefore, if immature individuals lost their mother prior to the age of 12 years old (social maturity), we excluded any sample collected from them following maternal loss during immaturity. However, as there is no evidence of long-term impacts of maternal loss in mature chimpanzees³⁰, all mature individuals were included
regardless of maternal loss during immunity. Furthermore, injury and sickness can elevate cortisol levels and affect circadian cortisol patterns in chimpanzees⁷¹. At both Taï and Budongo, researchers systematically report any signs of illness of injury in the chimpanzees to onsite veterinarians. These reports are then validated and recorded by the veterinarians. Using these records, we excluded samples from individuals that displayed symptoms of sickness or injury on the day of sampling.

Lastly, in male and female chimpanzees respectively, there tends to be a positive and negative correlation between dominance rank and GC levels⁶⁰,⁶⁸,⁶⁹. However, for one group in our study (Waibira), we had insufficient data to calculate ranks for the females, and in all groups, immature individuals are not traditionally considered part of the dominance hierarchy, and infrequently indicate submission to other immatures. Consequently, we were limited in the number of individuals we could confidently assign a dominance rank to, which would limit our sample size and pedigree depth for the heritability analyses. Therefore, in our main reported models, we did not include dominance rank as a fixed effect. Nevertheless, given the established importance of dominance rank in relation to stress in primates, we conducted a supplementary analysis. For mature adult males and females (excluding Waibira females, for whom we lacked sufficient data), dominance ranks were calculated using pant grunt vocalizations, a unidirectional call given from subordinate individuals¹⁰⁶. We used a likelihood-based adaptation of the Elo rating approach to calculate ranks¹⁰⁷,¹⁰⁸; we assigned continuous Elo ranks to subjects for each day of sampling; each score was standardized between 0 (lowest rank) and 1 (highest rank) within each group. To be able to include immature individuals in our supplementary analysis, we converted ranks among adults into categorical variables: males and females with Elo rating equal to or greater than the mean on each day of observation were considered “high-ranking males” and “high-ranking females” respectively, those with ratings below the mean were considered “low-ranking males” and “low-ranking females” respectively. We then categorized immature individuals as either “offspring of high-ranking females” or “offspring of low-ranking females” based on the rank category of their mother on the day of observation. We took this conservative approach, as opposed to creating a linear hierarchy within immatures, as we have insufficient data within immatures to establish the hierarchy and a lack of evidence that offspring inherit rank in a linear fashion; indeed, anecdotal evidence suggests dominance among immatures is more likely to be driven by age than mothers. This new dataset included on 5,691 samples and 141 individuals; results from this separate heritability analysis using this dataset are reported in Table S12, once again finding substantially higher contribution of non-genetic maternal effects compared to genetic effects.

To ensure that we were able to characterize circadian cortisol patterns for each individual, we only included individuals with a minimum of 3 urine samples per year, collected during both morning and afternoon hours, such that the earliest and latest samples were separated by at least 6 h. The reason for this criterion was to be able to model a meaningful quadratic circadian slope for each individual within a given year of sampling³⁰.

To accurately model circadian patterns of cortisol for all individuals (our measure of cortisol reaction norm), we included interactions between the linear and quadratic time variables and all other fixed effects. We used 12 years of age to distinguish between adult (aged ≥12 years) and immature individuals (aged <12 years), as it is the age at which individuals socialize and forage predominantly independently from their mothers⁹⁰. In addition to the demographic categorization (adult male, cycling female, lactating female, immature male, immature female) and age of each individual on the day of sampling, we included in the analysis a number of control variables known to influence cortisol levels. Both group size and mating competition⁵⁷,⁵⁹,⁶⁰ can affect GC levels in primates, therefore, we calculated both the number of adults (mean[+SD]; East 13.81[+2.19], North 8.92[+1.33], South 16.52[+2.58], Sonso 36.35[+4.12], Waibira 54.11[+2.50]) and the male-to-female sex ratio (mean[+SD]; East 0.35[+0.12], North 0.50[+0.19], South 0.37[+0.10], Sonso 0.49[+0.05], Waibira 1.02[+0.02]) at the time of sampling for each sample. Lastly, as seasonal variation in rainfall, temperature, humidity and food availability can influence cortisol levels in chimpanzees⁶², we accounted for this circannual variation by converting the Julian date of sampling into a circular variable and including its sine and cosine in our models⁶¹,⁶²,¹⁰⁹.

## Statistics and reproducibility

**Model fitting and verification.** All data preparation, models and analyses were performed using R version 3.6.3¹¹⁰ and the RStudio interface¹¹¹. Prior to testing our models, we applied the *vif* function of the 'car' R package¹¹² to linear model versions of our mixed models (i.e. lacking random effects) to test for any collinearity issues via examination of variance inflation factors (VIF). There were issues with collinearity if either “site” or “group” were included in the models as both variables were either collinear with each other or with “group size”. Therefore, we retained just “group size”, with all remaining VIFs <2.90. “Group” and “group-year” were also included as random effects to account for group-level confounds. To further test potential temporal batch effects, we ran additional models using a year-month random effect (one using all samples, another restricting our analyses to only data points for which data were available for more than one population). The results (Table S14 in the supplementary materials) were qualitatively and largely quantitatively identical to the less complex models presented in our main results.

All models were fitted with a Gaussian error distribution using the R package 'brms'¹¹³. For all models, numeric variables were standardized as z-scores. We fit models with weakly regularizing priors for the fixed effects (β-Normal(0,1)) and for the random effects (student t-distributed (3, 0, 10)), with uniform (LKJ(1)) priors for covariance matrices of the random slopes. For all models, we specified four chains of 4000 iterations, half of which were devoted to the warm-up. Sampling diagnostics (Rhat <1.1) and trace plots confirmed chain convergence for all models. Effective sample sizes confirmed no issues with autocorrelation of sampling for all models. We further validated models with posterior predictive checks using the *pp_check* function of 'brms' (Figs. S16 and S17 in Supplementary Materials).

We estimated the heritability of urinary cortisol levels and their circadian patterning by fitting an “animal model”, which estimates additive genetic variance in a trait by including the pedigree of individuals as a random effect⁴⁵. Pedigrees were generated with the R package 'MasterBayes'¹¹⁴. The additive genetic matrix was computed using the *Amatrix* function of the R package 'AGHmatrix'¹¹⁵.

**Repeatability and heritability calculations.** We calculated the repeatability and heritability of reaction norms following the same approach as references⁴⁵⁻⁴⁸. Specifically, we partitioned variance in average cortisol levels, $V_{intercept}$, variance in the linear cortisol response (slope) to time of day, $V_{linear}$, and the variance in the quadratic response (slope) to time of day, $V_{quadratic}$. These were computed as total variance excluding that explained by predictors related to technical aspects of the data (i.e. the project random effect).

For the repeatability analysis, total within-group variance in urinary cortisol concentrations ($V_{total}$) was calculated as the sum of variance explained by individual identity across years ($V_{individual}$) and within years, i.e. the ID-year variable ($V_{ID-year}$), as well as variance explained by group identity across years ($V_{group}$), and within years, i.e. the group-year variable ($V_{group-year}$).

Long-term trait repeatability (i.e. the proportion of variance in all urinary cortisol concentrations between years explained by individual differences) was calculated as:

$$V_{individual}/V_{total}$$

Short-term trait repeatability (i.e. the proportion of variance in all urinary cortisol concentrations within years explained by individual differences) was calculated as:

$$V_{ID-year} + V_{individual}/V_{total}$$

Reaction norm repeatability of average cortisol levels (i.e. the proportion of variation in average cortisol levels explained by individual differences) was calculated as:

$$V_{individual}/(V_{individual} + V_{ID-year})$$

Reaction norm repeatability of linear cortisol responses to time of day (i.e. the proportion of variation in the linear cortisol response to time of day explained by individual differences) was calculated using the variance of the random slope estimates for the linear term for time of day within the individual identity ($V_{linear,individual}$) and ID-year ($V_{linear,ID-year}$) random effects:

$$V_{linear,individual}/(V_{linear,individual} + V_{linear,ID-year})$$

Similarly, the reaction norm of quadratic cortisol responses was calculated as:

$$V_{quadratic,individual}/(V_{quadratic,individual} + V_{quadratic,ID-year})$$

For the heritability analysis and for each of $V_{intercept}$, $V_{linear}$ and $V_{quadratic}$, we partitioned the variance within groups ($V_{within}$) and between groups ($V_{group}$).

Hence, the proportion of variance explained by the shared community effects is:

$$V_{group, intercept}/(V_{group, intercept} + V_{within, intercept})$$

Variance in linear cortisol responses to time of day explained by shared community effects = $V_{group, linear}/(V_{group, linear} + V_{within, linear})$

Variance in quadratic cortisol responses to time of day explained by shared community effects = $V_{group, quadratic}/(V_{group, quadratic} + V_{within, quadratic})$

The within-group variance is defined, for each component of the reaction norm, as the sum of the variance explained by all biological predictors except group identity. Hence, for the *Full heritability model*:

$$V_{within,group} = V_{genetic, intercept} + V_{mother, intercept} + V_{group-year, intercept} + V_{individual, intercept} + V_{ID-year, intercept}$$

$$V_{within-group} = V_{genetic, linear} + V_{mother, linear} + V_{group-year, linear} + V_{individual, linear} + V_{ID-year, linear}$$

$$V_{group-year} = V_{genetic, quadratic} + V_{mother, quadratic} + V_{group-year, quadratic} + V_{individual, quadratic} + V_{ID-year, quadratic}$$

Thus, the proportion of within-group variance in the reaction norm components explained by genetic factors, henceforth reported as within-group genetic heritability, is then defined as:

$$V_{within, group} = V_{genetic, intercept} / V_{within, intercept}$$

$$V_{genetic, linear} / V_{within, linear}$$

$$V_{genetic, quadratic} / V_{within, quadratic}$$

A similar formulation applies for the variance explained by the maternal identity, henceforth defined as maternal effects:

$$V_{within, maternal} = V_{mother, intercept} / V_{within, intercept}$$
Within-group maternal effects on linear cortisol responses to time of day = $V_{\text{mother, linear}}/V_{\text{within, linear}}$

Within-group maternal effects on quadratic cortisol responses to time of day = $V_{\text{mother, quadratic}}/V_{\text{within, quadratic}}$

We also implemented a *Trait heritability model*, in which variance is not stratified in reaction norm components, hence unexplained residual variance $V_{\text{residual}}$ can be considered in the total variance.

In this case, heritability is defined as:

$$V_{\text{genetic}}/(V_{\text{genetic}} + V_{\text{mother}} + V_{\text{group-year}} + V_{\text{individual}} + V_{\text{ID-year}} + V_{\text{residual}})$$

**Ethical approval.** All methods were non-invasive and were approved by the Ministries of Research and Environment of Côte d'Ivoire, and Office Ivoiriens des Parcs et Réserves. All aspects of the study comply with the ethics policy of both the Max Planck Society and the Department of Primatology of the Max Planck Institute for Evolutionary Anthropology, Germany (www.eva.mpg.de/primat/ethical-guidelines.html) for the ethical treatment of non-human primates.

**Reporting summary.** Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

## Data availability

All data used in the analyses are available via Figshare (https://doi.org/10.6084/m9.fishshare.13720765.v1)¹¹⁶; all code used in the analysis are available at: https://github.com/fabrimafe/cortisol_heritability.

Received: 10 December 2022; Accepted: 3 May 2023;
Published online: 26 May 2023

## References

1. Selye, H. *The Physiology and Pathology of Exposure to Stress* (Acta, Inc., 1950).

2. Sapolsky, R. M., Romero, L. M. & Munck, A. U. How do glucocorticoids influence stress responses? Integrating permissive, suppressive, stimulatory, and preparative actions. *Endocr. Rev.* **21**, 55–89 (2000).

3. Tsigos, C. & Chrousos, G. P. Hypothalamic-pituitary-adrenal axis, neuroendocrine factors and stress. *J. Psychosom. Res* **53**, 865–871 (2002).

4. Beehner, J. C. & Bergman, T. J. The next step for stress research in primates: To identify relationships between glucocorticoid secretion and fitness. *Horm. Behav.* **91**, 68–83 (2017).

5. Bonier, F. & Cox, R. M. Do hormone manipulations reduce fitness? A meta-analytic test of the Optimal Endocrine Phenotype Hypothesis. *Mol. Cell. Endocrinol.* **500**, 110640 (2020).

6. Bonier, F. & Martin, P. R. How can we estimate natural selection on endocrine traits? Lessons from evolutionary biology. *Proc. R. Soc. B* **283**, 20161887 (2016).

7. Guindre-Parker, S. The evolutionary endocrinology of circulating glucocorticoids in free-living vertebrates: recent advances and future directions across scales of study. *Integr. Comp. Biol.* **58**, 814–825 (2018).

8. Taff, C. C., Schoenle, L. A. & Vitousek, M. N. The repeatability of glucocorticoids: a review and meta-analysis. *Gen. Comp. Endocrinol.* **260**, 136–145 (2018).

9. Campos, F. A. et al. Glucocorticoid exposure predicts survival in female baboons. *Sci. Adv.* **7**, eabf6759 (2021).

10. Hoffman, C. L., Ayala, J. E., Mas-Rivera, A. & Maestripieri, D. Effects of reproductive condition and dominance rank on cortisol responsiveness to stress in free-ranging female rhesus macaques. *Am. J. Primatol.* **72**, 559–565 (2010).

11. Caulfield, J. I. & Cavigelli, S. A. Individual differences in glucocorticoid regulation: does it relate to disease risk and resilience? *Front. Neuroendocrinol.* **56**, 100803 (2020).

12. Rakotoniaina, J. H. et al. Hair cortisol concentrations correlate negatively with survival in a wild primate population. *BMC Ecol.* **17**, 30 (2017).

13. Guindre-Parker, S. Individual variation in glucocorticoid plasticity: considerations and future directions. *Integr. Comp. Biol.* **60**, 79–88 (2020).

14. Bartels, M., Van den Berg, M., Sluyter, F., Boomsma, D. I. & de Geus, E. J. C. Heritability of cortisol levels: review and simultaneous analysis of twin studies. *Psychoneuroendocrinology* **28**, 121–137 (2003).

15. Bartels, M., de Geus, E. J. C., Kirschbaum, C., Sluyter, F. & Boomsma, D. I. Heritability of Daytime Cortisol Levels in Children. *Behav. Genet* **33**, 421–433 (2003).

16. Gustafsson, P. A. et al. Heritability of cortisol regulation in children. *Twin Res. Hum. Genet.* **14**, 553–561 (2011).

17. Steptoe, J., van Jaarsveld, C. H. M., Semmler, C., Plomin, R. & Wardle, J. Heritability of daytime cortisol levels and cortisol reactivity in children. *Psychoneuroendocrinology* **34**, 273–280 (2009).

18. Franz, C. E. et al. Genetic and environmental influences on cortisol regulation across days and contexts in middle-aged men. *Behav. Genet.* **40**, 467–479 (2010).

19. Morris, T. T., Davies, N. M., Hemani, G. & Smith, G. D. Population phenomena inflate genetic associations of complex social traits. *Sci. Adv.* **6**, eaay0328 (2020).

20. Van Hulle, C. A., Shirtcliff, E. A., Lemery-Chalfant, K. & Goldsmith, H. H. Genetic and environmental influences on individual differences in cortisol level and circadian rhythm in middle childhood. *Horm. Behav.* **62**, 36–42 (2012).

21. Mayhew, A. J. & Meyre, D. Assessing the heritability of complex traits in humans: methodological challenges and opportunities. *Curr. Genomics* **18**, 332–340 (2017).

22. Kruuk, L. E. B. & Hadfield, J. D. How to separate genetic and environmental causes of similarity between relatives. *J. Evolut. Biol.* **20**, 1890–1903 (2007).

23. Bairos-Novak, K. R., Ryan, C. P., Freeman, A. R., Anderson, W. G. & Hare, J. F. Like mother, like daughter: heritability of female Richardson's ground squirrel Urocitellus richardsonii cortisol stress responses. *Curr. Zool.* **64**, 153–163 (2018).

24. Béziers, P., San-Jose, L. M., Almasi, B., Jenni, L. & Roulin, A. Baseline and stress-induced corticosterone levels are heritable and genetically correlated in a barn owl population. *Heredity* **123**, 337–348 (2019).

25. Fairbanks, L. A. What is a good mother? Adaptive variation in maternal behavior of primates. *Curr. Dir. Psychol. Sci.* **2**, 179–183 (1993).

26. Houslay, T. M. et al. Genetic integration of behavioural and endocrine components of the stress response. *eLife* **11**, e67126 (2022).

27. Jenkins, B. R., Vitousek, M. N., Hubbard, J. K. & Safran, R. J. An experimental analysis of the heritability of variation in glucocorticoid concentrations in a wild avian population. *Proc. R. Soc. B: Biol. Sci.* **281**, 20141302 (2014).

28. Moore, M. P., Whiteman, H. H. & Martin, R. A. A mother's legacy: the strength of maternal effects in animal populations. *Ecol. Lett.* **22**, 1620–1628 (2019).

29. Champagne, F. A. & Curley, J. P. Epigenetic mechanisms mediating the long-term effects of maternal care on development. *Neurosci. Biobehav. Rev.* **33**, 593–600 (2009).

30. Girard-Buttoz, C. et al. Early maternal loss leads to short- but not long-term effects on diurnal cortisol slopes in wild chimpanzees. *eLife* **10**, e64134 (2021).

31. Maccari, S., Krugers, H. J., Morley-Fletcher, S., Szyf, M. & Brunton, P. J. The consequences of early-life adversity: neurobiological, behavioural and epigenetic adaptations. *J. Neuroendocrinol.* **26**, 707–723 (2014).

32. Zhang, T. Y., Labonté, B., Wen, X. L., Turecki, G. & Meaney, M. J. Epigenetic mechanisms for the early environmental regulation of hippocampal glucocorticoid receptor gene expression in rodents and humans. *Neuropsychopharmacology* **38**, 111–123 (2013).

33. Rosenbaum, S. et al. Social bonds do not mediate the relationship between early adversity and adult glucocorticoids in wild baboons. *Proc. Natl Acad. Sci. USA* **117**, 20052–20062 (2020).

34. Pan, P., Fleming, A. S., Lawson, D., Jenkins, J. M. & McGowan, P. O. Within- and between-litter maternal care alter behavior and gene regulation in female offspring. *Behav. Neurosci.* **128**, 736–748 (2014).

35. Tomilin, M. I. Length of gestation period and menstrual cycle in the chimpanzee. *Nature* **137**, 318–319 (1936).

36. Wittig, R. M. & Boesch, C. Demography and life history of five chimpanzee communities in Tai National Park. In *The Tai Chimpanzees: 40 years of Research* (Cambridge University Press, 2019).

37. Crockford, C., Samuni, L., Vigilant, L. & Wittig, R. M. Postweaning maternal care increases male chimpanzee reproductive success. *Sci. Adv.* **6**, eaaz5746 (2020).

38. Samuni, L. et al. Maternal effects on offspring growth indicate post-weaning juvenile dependence in chimpanzees (Pan troglodytes verus). *Front. Zool.* **17**, 1 (2020).

39. Stanton, M. A., Lonsdorf, E. V., Murray, C. M. & Pusey, A. E. Consequences of maternal loss before and after weaning in male and female wild chimpanzees. *Behav. Ecol. Sociobiol.* **74**, 22 (2020).

40. Bründl, A. C. et al. Maternal effects on the development of vocal communication in wild chimpanzees. *iScience* **25**, 105152 (2022).

41. Lehmann, J., Korstjens, A. H. & Dunbar, R. I. M. Fission-fusion social systems as a strategy for coping with ecological constraints: a primate case. *Evol. Ecol.* **21**, 613–634 (2007).

42. Tkaczynski, P. J. et al. Long-term repeatability in social behaviour suggests stable social phenotypes in wild chimpanzees. *R. Soc. Open Sci.* **7**, 200454 (2020).

43. Thompson, M. E. & Wrangham, R. W. Comparison of sex differences in gregariousness in fission-fusion species. In *Primates of Western Uganda* 209–226 (Springer, 2006).

44. Dingemanse, N. J. & Dochtermann, N. A. Quantifying individual variation in behaviour: mixed-effect modelling approaches. *J. Anim. Ecol.* **82**, 39–54 (2013).
45. Wilson, A. J. et al. An ecologist's guide to the animal model. *J. Anim. Ecol.* **79**, 13–26 (2010).

46. Baugh, A. T., van Oers, K., Dingemanse, N. J. & Hau, M. Baseline and stress-induced glucocorticoid concentrations are not repeatable but covary within individual great tits (Parus major). *Gen. Comp. Endocrinol.* **208**, 154–163 (2014).

47. Grace, J. K. & Anderson, D. J. Corticosterone stress response shows long-term repeatability and links to personality in free-living Nazca boobies. *Gen. Comp. Endocrinol.* **208**, 39–48 (2014).

48. Tkaczynski, P. J. et al. Repeatable glucocorticoid expression is associated with behavioural syndromes in males but not females in a wild primate. *R. Soc. Open Sci.* **6**, 190256 (2019).

49. Sonnweber, R. et al. Circadian rhythms of urinary cortisol levels vary between individuals in wild male chimpanzees: a reaction norm approach. *Front. Ecol. Evol.* **6**, 85 (2018).

50. Araya-Ajoy, Y. G., Mathot, K. J. & Dingemanse, N. J. An approach to estimate short-term, long-term and reaction norm repeatability. *Methods Ecol. Evol.* **6**, 1462–1473 (2015).

51. Araya-Ajoy, Y. G. & Dingemanse, N. J. Repeatability, heritability, and age-dependence of seasonal plasticity in aggressiveness in a wild passerine bird. *J. Anim. Ecol.* **86**, 227–238 (2017).

52. Strickland, K., Mitchell, D. J., Delmé, C. & Frère, C. H. Repeatability and heritability of social reaction norms in a wild agamid lizard. *Evolution* **75**, 1953–1965 (2021).

53. Visscher, P. M., Hill, W. G. & Wray, N. R. Heritability in the genomics era — concepts and misconceptions. *Nat. Rev. Genet.* **9**, 255–266 (2008).

54. Muller, M. N. & Lipson, S. F. Diurnal patterns of urinary steroid excretion in wild chimpanzees. *Am. J. Primatol.* **60**, 161–166 (2003).

55. Weitzman, E. D. et al. Twenty-four hour pattern of the episodic secretion of cortisol in normal subjects. *J. Clin. Endocrinol. Metab.* **33**, 14–22 (1971).

56. Emery Thompson, M. et al. Wild chimpanzees exhibit humanlike aging of glucocorticoid regulation. *PNAS* **117**, 8424–8430 (2020).

57. Preis, A., Samuni, L., Deschner, T., Crockford, C. & Wittig, R. M. Urinary cortisol, aggression, dominance and competition in wild, West African male chimpanzees. *Front. Ecol. Evol.* **7**, 107 (2019).

58. Samuni, L., Preis, A., Deschner, T., Wittig, R. M. & Crockford, C. Cortisol and oxytocin show independent activity during chimpanzee intergroup conflict. *Psychoneuroendocrinology* **104**, 165–173 (2019).

59. Emery Thompson, M., Muller, M. N., Kahlenberg, S. M. & Wrangham, R. W. Dynamics of social and energetic stress in wild female chimpanzees. *Horm. Behav.* **58**, 440–449 (2010).

60. Muller, M. N. & Wrangham, R. W. Dominance, cortisol and stress in wild chimpanzees (Pan troglodytes schweinfurthii). *Behav. Ecol. Sociobiol.* **55**, 332–340 (2004).

61. Wessling, E. G., Kühl, H. S., Mundry, R., Deschner, T. & Pruetz, J. D. The costs of living at the edge: Seasonal stress in wild savanna-dwelling chimpanzees. *J. Hum. Evol.* **121**, 1–11 (2018).

62. Wessling, E. G. et al. Seasonal variation in physiology challenges the notion of chimpanzees (Pan troglodytes verus) as a forest-adapted species. *Front. Ecol. Evol.* **6**, 60 (2018).

63. Hauser, B., Deschner, T. & Boesch, C. Development of a liquid chromatography-tandem mass spectrometry method for the determination of 23 endogenous steroids in small quantities of primate urine. *J. Chromatogr. B* **862**, 100–112 (2008).

64. Miller, R. C. et al. Comparison of specific gravity and creatinine for normalizing urinary reproductive hormone concentrations. *Clin. Chem.* **50**, 924–932 (2004).

65. Arandjelovic, M. et al. Two-step multiplex polymerase chain reaction improves the speed and accuracy of genotyping using DNA from noninvasive and museum samples. *Mol. Ecol. Resour.* **9**, 28–36 (2009).

66. Nakagawa, S. & Schielzeth, H. Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists. *Biol. Rev. Camb. Philos. Soc.* **85**, 935–956 (2010).

67. Vehtari, A., Gabry, J., Mans, M., Yao, Y. & Gelman, A. loo: Efficient leave-one-out cross-validation and WAIC for Bayesian models, R package version 2.6.0, https://mc-stan.org/loo/ (2019).

68. Muller, M. N. et al. Aggression, glucocorticoids, and the chronic costs of status competition for wild male chimpanzees. *Horm. Behav.* **130**, 104965 (2021).

69. Markham, A. C. et al. Rank effects on social stress in lactating chimpanzees. *Anim. Behav.* **87**, 195–202 (2014).

70. Grieneisen, L. et al. Gut microbiome heritability is nearly universal but environmentally contingent. *Science* **373**, 181–186 (2021).

71. Behringer, V. et al. Urinary cortisol increases during a respiratory outbreak in wild chimpanzees. *Front. Vet. Sci.* **7**, 485 (2020).

72. Samuni et al. Social bonds facilitate cooperative resource sharing in wild chimpanzees. *Proc. R. Soc. B: Biol. Sci.* **285**, 20181643 (2018).

73. Flack, J. C., Girvan, M., de Waal, F. B. M. & Krakauer, D. C. Policing stabilizes construction of social niches in primates. *Nature* **439**, 426 (2006).

74. Engh, A. L. et al. Behavioural and hormonal responses to predation in female chacma baboons (Papio hamadryas ursinus). *Proc. R. Soc. B: Biol. Sci.* **273**, 707–712 (2006).

75. Lemoine, S. et al. Between-group competition impacts reproductive success in wild chimpanzees. *Curr. Biol.* **30**, 312–318.e3 (2020).

76. Sandel, A. A. & Watts, D. P. Lethal coalitionary aggression associated with a community fission in chimpanzees (Pan troglodytes) at Ngogo, Kibale National Park, Uganda. *Int. J. Primatol.* **42**, 26–48 (2021).

77. Valé, P. D. et al. Energetic management in wild chimpanzees (Pan troglodytes verus) in Taï National Park, Côte d'Ivoire. *Behav. Ecol. Sociobiol.* **75**, 1 (2020).

78. Mitani, J. C., Watts, D. P. & Amsler, S. J. Lethal intergroup aggression leads to territorial expansion in wild chimpanzees. *Curr. Biol.* **20**, R507–R508 (2010).

79. Schreiber, J. E. et al. Environmental influences on family similarity in afternoon cortisol levels: twin and parent-offspring designs. *Psychoneuroendocrinology* **31**, 1131–1137 (2006).

80. Lemoine, S., Crockford, C. & Wittig, R. M. Spatial integration of unusually high numbers of immigrant females into the South group: Further support for the bissexually-bonded model in Taï chimpanzees. In *The Taï Chimpanzees: 40 years of Research* (Cambridge University Press, 2019).

81. Samuni, L., Langergraber, K. E. & Surbeck, M. H. Characterization of Pan social systems reveals in-group/out-group distinction and out-group tolerance in bonobos. *Proc. Natl Acad. Sci. USA* **119**, e2201122119 (2022).

82. Samuni, L. et al. Oxytocin reactivity during intergroup conflict in wild chimpanzees. *PNAS* **114**, 268–273 (2017).

83. Langergraber, K. E., Mitani, J. C., Watts, D. P. & Vigilant, L. Male-female socio-spatial relationships and reproduction in wild chimpanzees. *Behav. Ecol. Sociobiol.* **67**, 861–873 (2013).

84. Puurtinen, M. & Mappes, T. Between-group competition and human cooperation. *Proc. R. Soc. B: Biol. Sci.* **276**, 355–360 (2009).

85. Jaeggi, A. V. et al. Do wealth and inequality associate with health in a small-scale subsistence society? *eLife* **10**, e59437 (2021).

86. Miller, R. & Kirschbaum, C. Cultures under stress: a cross-national meta-analysis of cortisol responses to the Trier Social Stress Test and their association with anxiety-related value orientations and internalizing mental disorders. *Psychoneuroendocrinology* **105**, 147–154 (2019).

87. Jin, J. et al. Individual and community-level risk for COVID-19 mortality in the United States. *Nat. Med.* **27**, 264–269 (2021).

88. Watts, H. E., Tanner, J. B., Lundrigan, B. L. & Holekamp, K. E. Post-weaning maternal effects and the evolution of female dominance in the spotted hyena. *Proc. R. Soc. B: Biol. Sci.* **276**, 2291–2298 (2009).

89. Potticary, A. L. & Duckworth, R. A. Multiple environmental stressors induce an adaptive maternal effect. *Am. Nat.* **196**, 487–500 (2020).

90. Reddy, R. B. & Sandel, A. A. Social relationships between chimpanzee sons and mothers endure but change during adolescence and adulthood. *Behav. Ecol. Sociobiol.* **74**, 1–14 (2020).

91. Murray, C. M. et al. Maternal effects on offspring stress physiology in wild chimpanzees. *Am. J. Primatol.* **80**, e22525 (2018).

92. Bales, K., French, J. A. & Dietz, J. M. Explaining variation in maternal care in a cooperatively breeding mammal. *Anim. Behav.* **63**, 453–461 (2002).

93. Estienne, V., Cohen, H., Wittig, R. M. & Boesch, C. Maternal influence on the development of nut-cracking skills in the chimpanzees of the Taï forest, Côte d'Ivoire (Pan troglodytes verus). *Am. J. Primatol.* **81**, e23022 (2019).

94. Wittig, R. M. et al. Social support reduces stress hormone levels in wild chimpanzees across stressful events and everyday affiliations. *Nat. Commun.* **7**, 13361 (2016).

95. Wittig, R. M., Crockford, C., Weltring, A., Deschner, T. & Zuberbühler, K. Single aggressive interactions increase urinary glucocorticoid levels in wild male chimpanzees. *PLoS ONE* **10**, e0118695 (2015).

96. Dingemanse, N. J., Hertel, A. G. & Royauté, R. Moving away from repeatability: a comment on Stuber et al. *Behav. Ecol.* **33**, 488–489 (2022).

97. Wittig, R. M. & Boesch, C. Observation Protocol and Long-Term Data Collection in Taï. In *The Chimpanzees of the Taï Forest: 40 Years of Research* (Cambridge University Press, 2019).

98. Reynolds, V. *The Chimpanzees of the Budongo Forest: Ecology, Behaviour and Conservation* (Oxford University Press, 2005).

99. Samuni, L., Mundry, R., Terkel, J., Zuberbühler, K. & Hobaiter, C. Socially learned habituation to human observers in wild chimpanzees. *Anim. Cogn.* **17**, 997–1005 (2014).

100. Altmann, J. Observational study of behavior: sampling methods. *Behaviour* **49**, 227–267 (1974).

101. Waters Corporation. MassLynx Mass Spectrometry Software. (2005).

102. Nsubuga, A. M. et al. Factors affecting the amount of genomic DNA extracted from ape faeces and the identification of an improved sample storage method. *Mol. Ecol.* **13**, 2089–2094 (2004).

103. Kalinowski, S. T., Taper, M. L. & Marshall, T. C. Revising how the computer program cervus accommodates genotyping error increases success in paternity assignment. *Mol. Ecol.* **16**, 1099–1106 (2007).
104. Peacock, L. J. & Rogers, C. M. Gestation period and twinning in chimpanzees. *Science* **129**, 959–959 (1959).

105. Smith, R. & Thomson, M. 10 Neuroendocrinology of the hypothalamo-pituitary-adrenal axis in pregnancy and the puerperium. *Baillière's Clin. Endocrinol. Metab.* **5**, 167–186 (1991).

106. Wittig, R. M. & Boesch, C. Food competition and linear dominance hierarchy among female chimpanzees of the Tai National Park. *Int. J. Primatol.* **24**, 847–867 (2003).

107. Neumann, C., Duboscq, J., Dubuc, C., Ginting, A. & Engelhardt, A. Assessing dominance hierarchies: validation and advantages of progressive evaluation with Elo-rating. *Anim. Behav.* **82**, 911–921 (2011).

108. Mielke, A. et al. Flexible decision-making in grooming partner choice in sooty mangabeys and chimpanzees. *R. Soc. Open Sci.* **5**, 172143 (2018).

109. Stolwijk, A. M., Straatman, H. & Zielhuis, G. A. Studying seasonality by using sine and cosine functions in regression analysis. *J. Epidemiol. Community Health* **53**, 235–238 (1999).

110. R Core Team. *R: A Language and Environment for Statistical Computing* (R Foundation for Statistical Computing, 2020).

111. RStudio Team. *RStudio: Integrated Development Environment for R*. (RStudio, 2021).

112. Fox, J. & Weisberg, S. *An R Companion to Applied Regression* (Sage Publications, 2011).

113. Bürkner, P.-C. Advanced Bayesian multilevel modeling with the R package brms. *R. J.* **10**, 395 (2018).

114. Hadfield, J. *MasterBayes: ML and MCMC Methods for Pedigree Reconstruction and Analysis* https://cran.microsoft.com/snapshot/2021-03-11/web/packages/MasterBayes/index.html (2017).

115. Amadeu, R. R. et al. AGHmatrix: R Package to Construct Relationship Matrices for Autotetraploid and Diploid Species: A Blueberry Example. *Plant Genome* **9**, plantgenome2016.01.0009 (2016).

116. Tkaczynski, P. Non-genetic maternal effects shape individual differences in cortisol phenotypes in wild chimpanzees. figshare. https://doi.org/10.6084/m9.fishshare.13720765.v1 (2021).

## Acknowledgements

We thank the Ministère de l'Enseignement Supérieur et de la Recherche Scientifique, the Ministère de Eaux et Fôrets en Côte d'Ivoire, the Office Ivoirien des Parcs et Réserves, the Uganda Wildlife Authority and the Uganda National Council for Science and Technology for permitting the study. In Côte d'Ivoire, we are grateful to the Centre Suisse de Recherches Scientifiques en Côte d'Ivoire and the staff members of the Tai Chimpanzee Project for their support. In Uganda, we thank the management and staff of the Budongo Conservation Field Station. We are indebted to the efforts of Christophe Boesch and Vernon Reynolds in the establishments of the study field sites and their contributions to years of data collection. We also thank the many field and research assistants that help generate the data for this project. We are extremely grateful for the work conducted in the laboratories of Tobias Deschner and Linda Vigilant in the Max Planck Institute of Evolutionary Anthropology, Leipzig, Germany, specifically the efforts of Róisín Murtagh, Vera Schmeling, Janette Gleiche, Anette Nicklisch, Juliane Damm, Carolyn Rowney, and Jared Cobain. We also thank Ruth Sonnweber and Verena Behringer for useful discussions on the topic. This study was funded by the Max Planck Society and the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation program awarded to C.C. (grant agreement no. 679787). L.S. was supported by the Minerva Foundation, C.Y.A. and A.P. received funding from the LSB Leakey Foundation, C.Y.A. also received funding from Subvention Egalité (University of Neuchâtel, Switzerland) and Fonds des Donations (University of Neuchâtel, Switzerland).

C.G. was supported by the Wenner-Gren Foundation. VM was supported by a grant of Deutsche Forschungsgemeinschaft (DFG) granted to R.M.W. (WI 2637/3-1). Core funding for the Tai Chimpanzee Project was provided by the Max Planck Society since 1997 and for Budongo Conservation Field Station by the Royal Zoological Society of Scotland since 2008.

## Author contributions

C.C., C.G.B., F.M. and P.J.T. conceived the study. A.P., C.C., C.G., C.G.B., C.Y.A., E.G.W., L.S., L.W., P.F., P.J.T., P.D.V., R.M.W., T.D., T.L., V.M., and Z.S. collected data. T.D., L.S., C.H., K.Z., C.C., and R.M.W. provided long-term data. P.J.T., F.M., C.C., C.G.B., P.F., T.D. and R.M.W. helped design the study; F.M., C.G.B. and P.J.T. performed the statistical analyses; T.D. oversaw the laboratory analyses; L.V. supervised and conducted genetic parentage analyses; P.J.T. wrote the first draft of the manuscript, all authors contributed to subsequent editing.

## Funding

Open Access funding enabled and organized by Projekt DEAL.

## Competing interests

We have no competing interests to report.

## Additional information

**Supplementary information** The online version contains supplementary material available at https://doi.org/10.1038/s42003-023-04909-9.

**Correspondence** and requests for materials should be addressed to Patrick J. Tkaczynski or Fabrizio Mafessoni.

**Peer review information** *Communications Biology* thanks Zachary Laubach and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Primary handling editors: Christopher Hine and Luke R. Grinham. A peer review file is available.

**Reprints and permission information** is available at http://www.nature.com/reprints

**Publisher's note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_7.png" /></figure>

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

© The Author(s) 2023