Detecting context dependence in the expression of life history trade-offs

1. Life history trade-offs are one of the central tenets of evolutionary demography. Trade-offs, depicting negative covariances between individuals' life history traits, can arise from genetic constraints, or from a finite amount of resources that each individual has to allocate in a zero-sum game between somatic and reproductive functions. While theory predicts that trade-offs are ubiquitous, empirical studies have often failed to detect such negative covariances in wild populations. 2. One way to improve the detection of trade-offs is by accounting for the envi - ronmental context, as trade-off expression may depend on environmental con - ditions. However, current methodologies usually search for fixed covariances between traits, thereby ignoring their context dependence. 3. Here, we present a hierarchical multivariate ‘covariance reaction norm’ model, adapted from Martin (2023), to help detect context dependence in the expression of life-history trade-offs using demographic data. The method allows continuous variation in the phenotypic correlation between traits. We validate the model on simulated data for both intraindividual and intergenerational trade-offs. 4. We then apply it to empirical datasets of yellow-bellied marmots ( Marmota fla-viventer ) and Soay sheep ( Ovis aries ) as a proof- of-concept showing that new in - sights can be gained by applying our methodology, such as detecting trade-offs only in specific environments. 5. We discuss its potential for application to many of the existing long-term demo - graphic datasets and how it could improve our understanding of trade-off expres - sion in particular, and life history theory in general.


| INTRODUC TI ON
Demographic trade-offs, which are characterised as negative covariances between fitness components such as somatic or reproductive traits, are central to life history theory (Stearns, 1989), and are thought to constrain and organise much of the life history diversity that exists (Bielby et al., 2007;Healy et al., 2019;Salguero-Gómez et al., 2016;Stearns, 1984).They originate from the basic fact that the total amount of resources or energy acquired by any one individual is limited, and has to be shared among several of the individual's fitness-related traits.In such a zero-sum game and in the absence of change in the total amount of resources acquired, any increase in the allocation of resources towards a specific fitness component will have to be at the expense of another fitness component.While trade-offs stem from individual processes, these covariances can scale up to different levels of organisation (Agrawal, 2020;Bliard, Paniw, et al., 2024).If tradeoffs did not exist, selection would maximise all fitness-related traits simultaneously and would lead to the impossible "darwinian demons" (Law, 1979).Therefore, trade-offs should be faced by all organisms and are, in theory, ubiquitous (Stearns, 1989(Stearns, , 1992;;Williams, 1966).They can come in several forms (Stearns, 1989), being either intraindividual (traits involved relate to the fitness of the same individual) or intergenerational (traits involved relate to the fitness of a parent-offspring pair; e.g.offspring quantityquality trade-off).Despite their expected universality and being sought-after by evolutionary ecologists and biodemographers alike, life-history trade-offs have been surprisingly hard to de-tect in wild populations (Chang et al., 2023;Metcalf, 2016;van Noordwijk & de Jong, 1986), with successful probes too often confined to experimental approaches.
Several reasons could explain why trade-offs are hard to detect in wild populations.First, we often expect traits to covary in a simple bivariate manner following the Y-model of resource allocation, where any resources diverted from a trait will be allocated to the other one (de Jong & van Noordwijk, 1992).Thus, while we are often analysing a single pair of traits at a time, trade-off structures are often more complex.For instance, many more than two traits are likely to be involved in the resource allocation process (Cressler et al., 2017;de Jong, 1993;Pease & Bull, 1988), sometimes leading to complex hierarchical allocation trees, potentially resulting in some pairs of traits not covarying negatively (Gascoigne et al., 2022).Second, life history traits can covary at different levels.While trade-offs result from individuals' resource allocation processes, biodemographers often study trade-offs as the temporal correlations among demographic rates at the population level (Compagnoni et al., 2016;Fay et al., 2020;Fay, Hamel, et al., 2022;van Tienderen, 1995).Trade-offs can occasionally scale up to cause negative temporal covariances at the population level (van Tienderen, 1995), but in most cases these covariances are the results of environmental stochasticity and demographic reaction norms to shared ecological drivers (Fay, Hamel, et al., 2022;Knops et al., 2007;Paniw et al., 2020).Third, even though trade-offs might be present, individual heterogeneity can mask their presence among individuals.This specific ecological version of Simpson's paradox (Simpson, 1951) has been demonstrated by van Noordwijk and de Jong (1986): when the among-individual variance in resource acquisition is greater than the among-individual variance in resource allocation, the trade-off is not expressed among individuals-even though it is theoretically present within individuals.In addition, expression of a trade-off among individuals can also be influenced if the allocation and acquisition processes are not independent (Descamps et al., 2016;Fischer et al., 2009;Robinson & Beckerman, 2013).Altogether, this makes the detection of tradeoffs in wild populations difficult.
How much individuals vary in acquisition and allocation of resources determines if a trade-off is detected among individuals (Metcalf, 2016;Reznick et al., 2000;van Noordwijk & de Jong, 1986).
Part of this variance might be fixed, stemming from genetic, developmental, or consistent behavioural differences that constrain how much resources are acquired and allocated to somatic versus reproductive functions (Réale et al., 2007;Wilson & Nussey, 2010).The remaining variance is likely to be plastic (Spigler & Woodard, 2019), where acquisition versus allocation likely depends on the environmental context (Cohen et al., 2020;Sgrò & Hoffmann, 2004;Stearns et al., 1991).For instance, in several species, no trade-offs were found among captive animals fed ad libitum (Kengeri et al., 2013;Landes et al., 2019;Ricklefs & Cadena, 2007).Similarly, controlled laboratory experiments on several species have shown that tradeoffs detection and strength were dependent on resource abundance (Gebhardt & Stearns, 1988;Messina & Fry, 2003;Messina & Slade, 1999;Spigler & Woodard, 2019).However, despite evidence that trade-off expression depends on the environmental context, statistical methods to detect this context dependence in wild populations have, to date, rarely been applied.
Multivariate models are commonly employed to detect tradeoffs in wild populations (Cam et al., 2002(Cam et al., , 2013;;Fay, Authier, et al., 2022;Hamel et al., 2018;Paterson et al., 2018).In quantitative genetics, such models allow for the simultaneous analysis of multiple dependent variables like fecundity, growth and survival (Kruuk et al., 2008;Wilson, Réale, et al., 2010).These variables each have their own predictors, and the models estimate the correlated residual variances unaccounted for by the primary predictors.These models can be used to study residual correlations between traits at different levels, such as among-year correlation and among-individual correlation.For example, after accounting for primary predictors, such models quantify whether years with or whether individuals with higher fecundity have lower or higher growth rates.However, these correlations among residual variances are estimated as fixed.Estimating fixed correlations might not necessarily be problematic in the case of experimental work, in which environmental conditions can be held constant within each treatment.However, wild populations are unlikely to experience fixed conditions, as the environmental context will vary in a continuous fashion, hence influencing the expression of tradeoffs.Therefore, there is a need to analyse and predict continuous variation of phenotypic correlations.
Here, we repurpose a hierarchical multivariate 'covariance reaction norm' (hereafter CRN) model recently developed by Martin (2023), which allows the incorporation of continuous predictors directly on the covariance matrix, for application to sampling designs typical in population ecology, enabling the study of the context-dependent expression of trade-offs.As a proof-of-concept, we first validate this model on two simulated datasets, respectively focusing on an intergenerational trade-off and an intraindividual trade-off.We then apply our model on two empirical datasets of wild populations of yellowbellied marmots Marmota flaviventer and Soay sheep Ovis aries.Prior studies have explored trade-offs between vital rates in both species (Kroeger et al., 2020;Tavecchia et al., 2005).For instance, in yellowbellied marmots, a quality-quantity trade-off in offspring has been observed for older mothers.In Soay sheep, the costs of reproduction have been particularly evident for breeding ewes in high-density populations or following harsh winters.However, the environmental context-dependence of these trade-offs has yet to be studied explicitly.In the marmots, which inhabit high-altitude, highly seasonal environments, and the sheep, which face severe winter storms and fluctuating population densities, we hypothesise that trade-offs are more likely to manifest under unfavourable ecological conditions (Cohen et al., 2020;Sgrò & Hoffmann, 2004).

| The model
In this study, we employ a newly introduced CRN model (Martin, 2023), which has been developed as a quantitative genetic model to predict continuous changes in trait associations when either genetic data or repeated individual measurements are available for all phenotypes of interest.A key assumption of multivariate models thus far has been that phenotypic correlations caused by trade-offs are fixed through time or space (Cam et al., 2002;Hamel et al., 2018).The CRN approach provides a solution to this general challenge, by allowing for phenotypic covariances to vary in response to variation in the environment, for example, estimating under which conditions among-individual variance in resources allocation is larger than among-individual variance in acquisition (van Noordwijk & de Jong, 1986).In the present study, we extend application of this general CRN approach to the detection of context-dependent trade-offs (here defined as among-individual correlations even though both are not always equivalent) between life history traits, with special consideration to sampling conditions typical of long-term field research in population ecology.Specifically, we examine the use of bivariate CRN models to test for the presence of phenotypic trade-offs when repeated individual measurements are lacking in a given environmental context (e.g. during a specific sampling event such as a breeding season or a year).These are typical situations in field research that motivate further development of the quantitative genetic models proposed by Martin (2023).
Before delving into the specifics of the model, note that in all the following models presented, measurements of the same individuals observed in different contexts are considered independent (see Section S1 for more details).This necessary simplification has potential consequences when searching for the phenotypic manifestation of trade-offs, as fixed heterogeneity across ecological contexts cannot be properly disentangled from context-dependent heterogeneity, which might lead to issues especially in long-lived species that are observed across many different contexts.Nonetheless, this simplification does not impede our ability to detect context-dependence of among-individual correlations (Section S1).Consider a CRN model investigating how environmental contexts C and individual factors affect the phenotypic means of 1 and 2 and among-individual correlations r between two Gaussian life history trait measures z 1 and z 2 with repeated individual measurements in each environmental context.X 1 and X 2 are N × P matrices of N measurements of P predictors.We begin by focusing on linear models to simplify notation and aid comprehension, with generalised models for non-Gaussian distributions discussed further below.Following Martin (2023) 1is no longer necessary in Equation 2 in the absence of repeated measurements.As a consequence, we expect that the observation-level correlation r o(C) between these random effects to reflect the combined effect of the among-and within-individual correlations between life history traits, weighted by the geometric mean of their repeatability R (Dingemanse & Dochtermann, 2013;Searle, 1961).
Where phenotypic variances are adjusted for the mean effects of X 1  1 and X 2  2 .We can see that inferences about amongindividual trade-offs from the non-repeated measures model (Equation 2) will be at greatest risk of bias when sign r ≠ sign r Figure 1 shows these general relationships across correlation and repeatability ranges, identifying regions of sign bias.Fortunately, researchers will generally be able to judge their risk of inferential bias based on a priori knowledge about the repeatability of life history traits, which tends to be medium to high (Dingemanse et al., 2021).For example, observationlevel correlations of behavioural traits will tend to be dominated by within-individual associations (Bell et al., 2009;Cauchoix et al., 2018;Holtmann et al., 2017), while morphological associations will tend to be dominated by among-individual variation (Dingemanse et al., 2021).
We reiterate that our models consider measurements of the same individuals observed in different contexts as independent (see Section S1).
In addition, our model considers no measurement errors, as we are not able to disentangle it from true within-individual variation using nonrepeated measures.Such considerations regarding trait repeatability and measurement error should be explicit when interpreting results without repeated measures.

| Hybrid scenarios
Variation in repeated sampling is also likely to occur across phenotypes due to factors such as difficulty of measurement and the rate of trait expression.While a single measure of age at first reproduction or fecundity in a given environmental context may be available per individual, multiple individual measures may be available for traits such as offspring quality.Such scenarios require a hybrid modelling approach.For example, consider a model with a single predictor for an intergenerational trade-off between fecundity (e.g.clutch size) and offspring quality, but other traits could equally be studied.
The model structure for offspring quality z 1 (depicted as offspring body mass), a gaussian trait, is given by (2) (3)

| Validation on simulated datasets
We validated the CRN model on two different types of trade-offs.

| Intergenerational trade-off (offspring quantity-quality)
We first focused on an intergenerational trade-off between offspring quantity and quality (hybrid CRN model).This quantity-quality trade-off has been the focus of numerous studies since Lack's pioneering work on bird clutch sizes (Einum & Fleming, 2000;Fischer et al., 2011;Gillespie et al., 2008;Lack, 1947;Williams, 1966).We

| Intraindividual trade-off (fecundity-growth)
We then simulated data for an intraindividual trade-off between fecundity and growth (non-repeated measures CRN model).This simulated dataset is also made of 30 years and 750 individuals, for a total of 1974 reproductive events, with a variable observation-level correlation between individual growth and fecundity, which is itself dependent on a single climatic predictor.

| Marmots
We We considered two measures quantifying environmental conditions for a given year.First, the total amount of snow during the preceding winter, with years of little overwinter snow considered harsher for marmots as it offers limited thermal insulation during the hibernation (Barash, 1973;Cordes et al., 2020;Wells et al., 2022).Second, the average daily maximum temperature during the month of June, with warmer summer temperatures considered unfavourable conditions for marmots as they are prone to overheating, hence limiting the time that can be allocated to foraging (Cordes et al., 2020;Krajick, 2004;Melcher et al., 1990).Note that we used temperature in June and not July as commonly used in this system (Cordes et al., 2020), because this is more likely to represent the conditions experienced for most offspring before emergence and weaning, since most offspring emerge in July.We expected trade-offs to be more strongly expressed among individuals in years with little overwinter snow or high summer temperature.In total, we used 2540 offspring mass from 597 reproductive events, from 279 females across 42 years.
We modelled offspring mass using a normal distribution (Equation 6.1), and we included as covariates (i.e. in X 1 ) the total amount of snow during the winter, June average maximum temperature, age of the mother and its quadratic effect, and mother's estimated mass in early June as a proxy of mother's quality.A year random effect δ 1 was also included, With a 1(Y) being a year-specific mother random effect and ϵ 1(Y) the within-litter variance.
We modelled the second trait, fecundity (i.e.litter size), using a Poisson distribution (Equation 6.2), as a function of the same covariates (X 2 ), except June average maximum temperature, since it cannot affect fecundity as pregnancies mostly occur before this period.
A year random effect δ 2 was also included, For the observation-level correlation (Equation 6.3), the two environmental variables (winter snow and June temperature) were added as covariates (X 3 ), (6.1)  et al., 2005).Therefore, we searched for an intraindividual tradeoff between ewes' fecundity defined as the number of lambs born in Spring (ranging from 0 to 2) and their log mass in the following summer, with both traits conditional on ewes surviving the winter.
We considered two environmental variables to characterise the ecological harshness faced by the sheep in a given year: population density and NAO (North Atlantic Oscillation) in the winter preceding parturition, with high NAO values corresponding to wet and stormy winters (Coulson et al., 2001;Regan et al., 2022).In total, we used data from 2497 reproductive events across 37 years, for 861 ewes with known mass in the summer preceding the reproductive event, as well as known mass in the following summer.We expected trade-offs to be more strongly expressed in years of high population density or high NAO.
As ewes' fecundity in a given year is restricted to [0,2], we could not use a Poisson regression.This is due to the count data being underdispersed relative to a Poisson distribution.We therefore modelled the ewe's fecundity using an ordinal regression (also called cumulative logistic regression; Equation 7.1), and we included as covariates (X 1 ) the individual's log mass preceding the reproductive event as a proxy of quality, age and its quadratic effect, and population density, where the cumulative probability of having at most i offspring is given as a function of the threshold i and the matrix of covariates X 1 , as well as a year random effect δ 1 and a year specific observation random effect o 1(Y) .We modelled the ewe's log mass in the following summer using a normal distribution (Equation 7.2), and included in X 2 the same covariates as in X 1 , as well as NAO in the winter preceding parturition.A year random effect δ 2 was also included.
For the observation-level correlation (Equation 7.3), the two ecological variables (winter NAO and density) were added as covariates (X 3 ), The posterior predictive checks we performed highlighted a good fit between the data and data generated under the model.This confirms that using a normal distribution to model ewe's mass, and using a cumulative logistic regression to model ewe's number of offspring, were appropriate (see Figure S4).

| Model implementation
We implemented all multivariate models described above in a Bayesian framework using the Stan statistical language (Carpenter et al., 2017), through the software R (R Core Team, 2021) using the R package CmdStanR (Gabry & Češnovar, 2020).Stan was preferred for model implementation because of its flexibility.Common regularising priors were used for all model parameters: normal distributions of mean 0 and standard deviation of 1 for intercepts and slopes coefficients, and exponential distributions of rate 2 for variance parameters.Each model ran on 3 chains, with a burn-in period of 1000 iterations, sampling for 3000 iterations, keeping all the sampled iterations (Link & Eaton, 2012).Convergence of parameter estimates was assessed visually and using the Gelman-Rubin diagnostic (Gelman & Rubin, 1992).We report the full posterior distributions, alongside their mean, 50%, and 89% credible intervals (McElreath, 2020).The Stan code to implement all the CRN models presented in this study is available on GitHub (https:// github.com/ lbiard/ detec ting_ trade offs_ crn_ models) and is permanently archived on Zenodo (https:// doi.org/ 10. 5281/ zenodo.12800618).

| RE SULTS
The model validation performed on simulated datasets showed that parameters were correctly recovered for both intergenerational trade-offs (Figure 2) and intraindividual trade-offs (Figure 3).While The model applied to yellow-bellied marmot data shows trends towards trade-offs being more strongly expressed in years with harsh environmental conditions, albeit with high uncertainty in the estimates (Figure 4).We found a positive mean effect of the amount of overwinter snow on the correlation (Figure 4), meaning that the trade-off between fecundity and offspring quality was more strongly expressed after winters with little snow.We also found a negative mean effect of the average maximum June temperature on the correlation (Figure 4), where females with more offspring were more likely to have lighter offspring during warmer summers.Estimated effects of covariates on either fecundity or offspring mass can be found in Figure 4, as well as in Figure S5.
Estimated effects of covariates on the correlation also had high uncertainty in the Soay sheep dataset (Figure 5).Overall, we found that the correlation tended to be negative across most environments, which means that ewe's growth was lower for the ones that weaned offspring (Figure 5).Contrary to our expectations, while we hypothesised that the trade-offs should be more strongly expressed in wet and stormy winters (high NAO index), we found a positive effect of winter NAO on the correlation between fecundity and growth (Figure 5).We also found a positive effect of population density on the expression of the trade-off (Figure 5).Estimated effects of covariates on either fecundity or ewe's mass can be found in Figure 5, as well as in Figure S6.

| DISCUSS ION
Our proof-of-concept study demonstrates that hierarchical multivariate CRN models (Martin, 2023) can be used successfully to detect and estimate context-dependent changes in trade-off expression, though estimation uncertainty can be large.In agreement with theoretical predictions and despite large uncertainty, we found that reproductive trade-offs in yellow-bellied marmots tend to be more strongly expressed under unfavourable climatic conditions.In Soay sheep, we found some context-dependence in the expression of the trade-off, but effect directions were opposite to our initial prediction.This hierarchical model has the potential to be used on many long-term individual-based datasets and could help improve our understanding of trade-off expression and life history theory.
Although the initial motivation to use this method partly rested on the observed difficulty of finding trade-offs in empirical datasets, we found that in both sheep and marmots, the trade-offs tend to be expressed across most environments, with mean phenotypic correlations being negative overall.Thus, ironically, in these two as this negative correlation between growth and fecundity was already found on a smaller dataset (Fung et al., 2022).Nonetheless, the results still highlight that context-dependence has the potential to hinder our ability to detect trade-offs in some cases.For instance, when marmots experience favourable environmental conditions, the average correlation is closer to null with credibility intervals nearing or overlapping zero (Figure 4), while this intergenerational trade-off is found to be more strongly expressed during harsh years.In Soay sheep, context dependence appears to be marked for the expression of the trade-off, but opposite to our predictions.Indeed, we found a positive correlation between growth and fecundity only under the harshest environmental conditions (high population density and high winter NAO, Figure 5).
Since ewes' mass is measured in the following summer and not directly after parturition, harsh winter conditions are expected to increase overwinter mortality (Milner et al., 1999), lowering spring population density and reducing competition.This could potentially help surviving ewes to recover their body condition between spring and summer, which is the period of greatest grass growth, hence potentially explaining our counter-intuitive results.We can also speculate that the result could have arisen from two potential pitfalls due to idiosyncrasies of the Soay sheep data.First, among-individual variation in fecundity is limited in sheep, ranging from no offspring to twins, potentially making it more complicated for the model to estimate variances accurately (Fay, Authier, et al., 2022;Kain et al., 2015).Second, both ewes' growth and fecundity are conditional on survival in the data, hence individuals who suffered most from the cost of reproduction and did not survive are not present in the analysis, potentially biasing the results (Hadfield, 2008).Finally, while we expected more negative pheno- are to be considered.A recent study conducted by Fay, Authier, et al. (2022) highlighted that multivariate models with correlated random effects for Bernoulli traits performed rather poorly, resulting in a potentially large bias and imprecise estimates of variances and covariances.This is in part because Bernoulli traits contain less information than continuous variables, making estimations of variances complicated (Fay, Authier, et al., 2022), but also because the data available to estimate individual heterogeneity is fulfil these requirements (de Villemereuil et al., 2020).
Despite the abovementioned caveats and limitations of the methodology in the absence of repeated measurements, this new model is a development that could be useful for many datasets.Thanks to its implementation in a Bayesian framework using Stan (Carpenter et al., 2017), it offers great flexibility and can be easily repurposed and modified to fit the idiosyncrasies of a given dataset or species life history.It is also straightforward to extend the model by adding a pedigree for quantitative genetic analysis (see Martin, 2023), even though phenotypic correlations should be good approximations of genetic correlations in most cases (Cheverud, 1988;Dochtermann, 2011;Roff, 1995).While we presented a bivariate model, this model is not necessarily limited to two traits, and more continuous traits and their covariances could also be analysed simultaneously.We also restricted our proof-of-concept study to the reaction norm of the correlation between traits, but researchers interested in the canalisation of traits variances as a response to the environmental context could also benefit from this modelling approach (Péron et al., 2016).
Life history trade-offs have long been sought after, but difficult to detect in observational data due to individual heterogeneity (Metcalf, 2016;Reznick et al., 2000;van Noordwijk & de Jong, 1986).Previous studies have also highlighted that life history trade-offs could be expressed only under unfavourable ecological conditions (Cohen et al., 2020;Stearns, 1989).Yet, despite our knowledge of the issues hindering trade-off detection, we still lacked a statistical framework that permits the detection of context-dependence in trade-off expression.Our proof-of-concept study shows that this context dependence can be detected.This method has the potential to be applied by demographers and evolutionary ecologists having long-term individual-based datasets at hands, with many study systems having the required data (Culina et al., 2021;de Villemereuil et al., 2020).Altogether, this method has the potential to help us improve our understanding of life history theory, and in part resolve van Noordwijk and de Jong (1986) conundrum of trade-off detection, by accounting for the contextdependence of their expression.
covariance reaction norm, demography, heterogeneity, life-history, mixed effects, multivariate model, phenotypic correlation, trade-off 13652656, 0, Downloaded from https://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2656.14173,Wiley Online Library on [03/09/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License high survival in a population are also years with high recruitment; in the absence of genetic data, our bivariate phenotypic model is given by Trait values are expressed as a function of the average effects  1 and  2 of X 1 and X 2 on each phenotype, as well as among-individual effects  1(C) and  2(C) that are repeatable across measurements and within-individual effects  1(C) and  1(C) that are variable across measurements.The model matrix W (an N × J matrix for J subjects) structures the among-individual effects  (C) across repeated measurements.(Co)variances between independent among-and withinindividual effects are respectively described by P and  covariance matrices.To detect context-dependent trade-off expression, we use environmental information in X 3 (an C × P matrix of C environmental contexts of P predictors) to predict the among-individual trait covariance matrix P (C) , (1.1) r 13652656, 0, Downloaded from https://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2656.14173,Wiley Online Library on [03/09/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License where the inverse hyperbolic tangent function atanh(r) = logit([r + 1]/2)/2 is used as a link function to model additive environmental effects  r on the logit scale while retaining the [−1,1] scaling of the correlation coefficient r.This is akin to a logistic regression with bounds in [−1,1] instead of [0,1].The same approach can be taken to describe changes in within-individual variation across environmental contexts, Direct prediction of the transformed correlation coefficient is useful because we are principally interested in r (C) as an indicator of putative trade-offs, rather than the covariance P 1,2(C) = r (C) 1 2 per se.Changes in the scale 1 2 of life history trait variation may occur independently of changes in positive or negative trait association among individuals, but these effects will be confounded together in the covariance P 1,2(C) .In contrast, the correlation coefficient r (C) is standardised relative to the scale of each phenotype, providing a more robust quantity for directly predicting and comparing estimates of life history trade-offs across phenotypes and species.Our model also assumes that phenotypic variances can vary across environmental contexts, but no predictions are made on this variation.Greater plasticity is instead expected in the strength of trade-off expression caused by fluctuating environmental factors (e.g.environmental harshness, resource availability, local predator density).See Martin (2023) for further details on relaxing these assumptions to model environmental effects on among-and withinindividual variances.2.1.1 | Non-repeated measures Estimating Equation 1 with empirical data requires multiple measurements of the same subjects to effectively partition trait correlations due to sources of among P (C) and within-individual Σ (C) phenotypic variation, relative to a given window of sampling (i.e. a given environmental context C).Repeated individual measurements are often inconsistent or unavailable in a given environmental context (e.g. a single fecundity measurement for individuals in a given year) in longterm field studies, which otherwise provide invaluable datasets for investigating context-specific trade-offs in the wild.Fortunately, we can still take advantage of long-term environmental variation in such studies to detect variation in trade-off expression without repeated measurements in a given environmental context.This requires simplifying the CRN model to predict observation-level phenotypic associations across environmental contexts.Here, the lack of repeated measurements mean that we cannot decompose the variance between among-and within-individual variation.Therefore, o 1(C) =  1(C) +  1(C) and o 2(C) =  2(C) +  2(C) are observation-level random effects aggregating variation due to amongand within-individual differences across measurements, within a given environmental context defined by C (e.g. a given year, position in space, level of resource abundance).Note that the W matrix from Equation 0, Downloaded from https://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2656.14173,Wiley Online Library on [03/09/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License The linear predictor for z 1 (mass of an offspring of a given mother) in year C includes a year-specific mother random effect  1(C) and  1(C) being the within-brood/litter variance.The model for fecundity z 2 follows the same basic structure, with a single fecundity measurement per female per year.We can use a Poisson distribution where we model the expected rate of offspring production using a log link function, but other distributions could equally be used, Without repeated measures, the random effect o 2(C) is specified at the observation-level, accounting for any overdispersion in the Poisson process across measurements of each female.The context-dependent trade-off will be estimated between the among-mother random effect in offspring quality and the observation-level random effect in fecundity Reducing Equation 3, the correlation r C between the individual- 1(C) and observation-level o 2(C) effects will necessarily be proportional to the among-individual correlation across life history traits, Note that this method does not allow the inclusion of non-continuous traits (e.g.Bernoulli traits) in the absence of repeated measurements within a given environmental context C (e.g. a given year).

First
, we used the hybrid CRN model to study an intergenerational trade-off between fecundity and quality.The hybrid model is well suited because fecundity (i.e.clutch/litter size) has a single measurement per mother per year, while offspring quality (i.e.offspring mass) has repeated measurements per mother per year (one measurement for each offspring produced).Second, we used the nonrepeated measures CRN model to study an intraindividual trade-off between fecundity (clutch/litter size) and parental growth (the change of mass from a year to the next).The non-repeated measures CRN model is well suited as both traits are expressed only a single time per year (one fecundity and one parental growth measure per individual per year).Note that trade-offs are described as intergenerational or intraindividual depending on which traits are studied (as explained inStearns, 1989), and both type of trade-off can be decomposed into among-and within-individual covariation.We simulate data for these two trade-offs using the individual-based simulation described inBliard, Paniw, et al. (2024), whereby the among-individual correlation between life history traits can be made dependent on the environmental context.The code to generate data from the individual-based simulation can be found on Zenodo(Bliard, Martin, et al., 2024).This model validation is only intended (4.1) E 1 General relationships across correlations and repeatability ranges based on Equation 3 for a non-repeated measures CRN (model of Equation2), identifying the magnitude of correlation bias and the regions of sign bias.The bias is here defined as the difference between the observation-level correlation and the among-individual correlation, using the latter as a reference.Parameter spaces in grey represent the regions of sign bias, where the observation-level correlation has a sign opposite to the among-individual correlation.This highlights that the observation-level correlation is mostly influenced by the among-individual correlation for traits with high repeatability, while it is mostly influenced by the within-individual correlation for traits with low repeatability.toshow that context-dependent among-individual correlations (i.e.context dependent trade-offs) can be successfully recovered.For a more extensive simulation-based calibration of CRN models over a broad range of parameter values, seeMartin (2023).
simulate 30 years of individual-based data in which 25 new individuals enter the population each year, reproduce with an average clutch/litter size of 2.5, and then have a probability to survive to next year of 0.6.This yielded a final simulated dataset of 750 individuals, totaling 1578 reproductive events and 4783 offspring.An observation-level correlation was included between offspring mass and clutch size, and this correlation was made dependent on a single climatic predictor.The same climatic predictor was also included to influence both clutch size and offspring mass.
applied the hybrid CRN model (one trait with repeated individual measurements within a year and one trait without) on data from a yellow-bellied marmot population monitored at the Rocky Mountain Biological Laboratory in Gothic, Colorado (38°57′ N, 106°59′ W) during the summer season each year, whereby extensive individualbased data is collected (Armitage, 2014; Blumstein, 2013).Data were collected under the UCLA Institutional Animal Care and Use protocol (2001-191-01, renewed annually) and with permission from the Colorado Parks and Wildlife (TR917, renewed annually).The research was in compliance with ethical guidelines and current laws of the USA and the State of Colorado.In Alpine marmots, Marmota marmota, an offspring quality-quantity trade-off has been found (Berger et al., 2015), while it remained mostly elusive in yellow-bellied marmots, being only found for older mothers (Kroeger et al., 2020), whereby within-cohort selection has likely reduced the amount of among-individual variance in resource acquisition, thus making the trade-off visible(Kendall et al., 2011; van Noordwijk & de Jong, 1986).Therefore, we searched for an intergenerational trade-off between mothers' fecundity and offspring estimated mass (offspring qualityquantity trade-off).We used repeated measurements of offspring mass for each mother (one mass estimate for each offspring in a given litter).The offspring weaning mass was imputed based on the date of emergence for each litter and mass measurements from captures later in the season, following the method ofOzgul et al. (2010).

13652656, 0 ,
Downloaded from https://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2656.14173,Wiley Online Library on [03/09/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons LicenseWe performed posterior predictive checks, showing a good concordance between the litter size data, and data generated under the model (see FigureS3).However, the model slightly underestimates the variance in offspring mass.Overall, posterior predictive checks highlight that the use of a Normal distribution to model offspring mass and a Poisson distribution with an observation random effect to model litter size, were appropriate in this system.2.3.2 | Soay sheepWe applied the non-repeated measures CRN model on Soay sheep data, as we have no repeated individual measurement within a given year available for neither of the traits studied.We used data from an unmanaged population of feral sheep in the Village Bay area of the island of Hirta (57°48′ N, 8°37′ W), which has been monitored since 1985(Clutton-Brock & Pemberton, 2004).All fieldwork was conducted in accordance with the Animals (Scientific Procedures) Act 1986 and with permission from the University of Edinburgh Animal Welfare Ethical Review Body.In Soay sheep, survival costs of reproduction were found for breeding ewes, particularly in populations at high densities or following stormy winters (Tavecchia these simulation examples do not quantify bias of estimations (more details from a simulation-based calibration of CRN models are available inMartin, 2023), they still confirm that the model presented in the methods is able to detect context-dependence in the expression of trade-offs.

F
Left panel: Estimated versus simulated observation-level correlation between litter size and offspring mass as a function of climate, after accounting for the effect of climate on both traits.The regression line indicates the mean effect of climate on the correlation, while the shaded areas depict the 50% and 89% credible intervals predicted by the model.Each black dot represents the simulated observation-level correlation between both traits in a given year depending on climate.Right panel: Estimated versus simulated intercepts and slopes for the offspring mass and litter size sub-models.Dashed lines represent the value used to simulate the data, while the distributions and intervals represent the posterior distributions estimated by the model, alongside the median, 50% and 89% credible intervals.Litter size estimates are presented on the log scale.13652656, 0, Downloaded from https://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2656.14173,Wiley Online Library on [03/09/2024].See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions)on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License empirical datasets, trade-offs might have been detected using simpler multivariate methods without the need for context dependence.However, this should not come as a surprise for Soay sheep, typic correlations under harsh conditions, where among-individual variance in resource allocation is greater than among-individual variance in acquisition, it is theoretically possible that in a population facing adverse conditions, a few robust individuals monopolise most resources, thus increasing the among-individual variance in resource acquisition(Chambert et al., 2013), hence leading to positive estimates of phenotypic correlations.Despite the potential of this modelling approach to study context-dependent trade-offs, a few methodological limitations F I G U R E 3 Left panel: Estimated versus simulated observation-level correlation between fecundity and growth as a function of climate, after accounting for the effect of climate on both traits.The regression line indicates the mean effect of climate on the correlation, while the shaded areas depict the 50% and 89% credible intervals predicted by the model.Each black dot represents the simulated observation-level correlation between both traits in a given year depending on climate.Right panel: Estimated versus simulated intercepts and slopes for the growth and fecundity sub-models.Dashed lines represent the value used to simulate the data, while the distributions and intervals represent the posterior distributions estimated by the model, alongside the median, 50%, 89% credible intervals.Fecundity estimates are presented on the log scale.

F
Observation-level correlation between litter size and offspring mass in marmots as a function of the total amount of snow in the preceding winter at high and low temperature (top left panel) and the maximum daily June temperature of the year at high and low snow cover (top right panel).Estimated effects of standardised predictors (bottom panel) on offspring mass, fecundity, and the observation-level correlation between both traits in marmots.The regression line indicates the median estimated effect, while the shaded areas depict the 50% and 89% credible intervals predicted by the model.usually scarce(Browne et al., 2007).The model we present suffers from this limitation, and even more so when there is only a single individual observation per individual per sampling occasion (e.g.parental survival), and when the trait is not repeatable (death can only occur once).This issue renders the model, as well as any other multilevel model, unable to meaningfully estimate distinct mean and variance parameters for Bernoulli traits, due to the fact that the mean p of a Bernoulli variable determines its variability F I G U R E 5 Observation-level correlation between fecundity and mothers' mass in the following year in Soay sheep as a function of the winter NAO at high and low density (top left panel), and as a function of the population density at high and low winter NAO values (top right panel).Estimated effects (bottom panel) of standardised predictors on mother's mass in the following year, fecundity, and the observationlevel correlation between both traits in Soay sheep.The figure displays the posterior distributions estimated by the model, alongside the median, 50% and 89% credible intervals.p(1-p) without scope for overdispersion.Therefore, environmental effects on the mean of Bernoulli measures will necessarily change their variances (Skrondal & Rabe-Hesketh, 2007).However, when repeated Bernoulli observations or a binomial measure are available within each sampling occasion (e.g.survival of each offspring within a litter), the CRN model can then be used to partition distinct environmental effects on trait means and (co)variances.As we have shown in the present study, despite this limitation, the CRN remains applicable to single measures of continuous traits and count measures (e.g.growth, fecundity, phenology, behavioural traits), as well as proportions and various other kinds of non-Gaussian measures.Another limitation of the proposed method is that sample sizes needed are likely to be large, with enough individuals in each environmental context, and importantly enough sampling occasions across which to estimate the context dependence of trade-off expression.Nonetheless, many long-term individual-based studies should have enough data to