Habituation and individual variation in the endocrine stress response in the Trinidadian guppy (Poecilia reticulata)

Highlights • Trinidadian guppies habituate quickly to repeated stress exposure.• There are strong sex differences in average cortisol release rate.• Individuals consistently differ in their average cortisol release rate.• Limited evidence for individual variation in habituation rate.


Libraries and custom functions
We need to load libraries (these may have to be installed through your R IDE), and custom functions that are to be used later in the script.

Load data
Read in the file pilot_hormones_conj.csv. We then use some data wrangling to rename variables, or make some alterations -for example, we centre the Replicate variable manually below. Both free cortisol and 11KT were resuspended in 600uL of buffer, so we multiply their values by 0.6. Free cortisol was also diluted 1:32, so we multiply this value by 32. These new values give us the value of the whole sample. The conjugated versions were already calculated as the value for the sample, so are left unchanged from the data file.

Modelling data
Note that we provide here the 'final models' after simplification, rather than including all steps.

Habituation effects on mean hormone levels
Simplified fixed effects; random effect only of individual intercepts.

Reaction norm models
For each response trait in turn we tested for among-individual variance within the reaction norm framework.
To test for repeatable differences in average hormone levels (i.e., among-individual variance in reaction norm intercept) across all four repeats we compare the following models (with fixed effects as in the simplified models above): • No random effects • A random effect of individual ID (testing for consistent individual differences) • Random effects of ID and the interaction between ID and sampling repeat (as a continuous covariate), and their covariance We compared nested models using likelihood ratio tests (LRTs), in which we assume that twice the difference in model log-likelihoods conforms to a chi-square distribution where the degrees of freedom are set by the number of additional parameters in the more complex model.

Character state models
For each response variable we formulated a multivariate (4-'trait') model to test hypotheses about variance in -and covariance among -the four repeat-specific observations. Rather than using the raw data, we estimated (co)variances conditional on the fixed effects of sex, size, tank and order (as described above).
We fitted a series of nested models to test hypotheses about the structure of individual variation: • Model 1 estimates no covariances, and constrains the repeat-specific variances to be equal. • Model 2 allows these variances to differ.
• Model 3 extends model 2 by also estimating all covariances.
We compared nested models using likelihood ratio tests (LRTs), in which we assume that twice the difference in model log-likelihoods conforms to a chi-square distribution where the degrees of freedom are set by the number of additional parameters in the more complex model. Model 2 vs model 1 therefore tests whether phenotypic variance (conditional on fixed effects) changes significantly across repeats, and model 3 vs model 2 tests for the existence of significant within-individual covariance structure (i.e., that some degree of repeatability exists). Model 3 estimates the within-individual covariance-correlation matrix (conditional on fixed effects), which we used as the basis for a parametric bootstrap method (described in Boulton et al. 2014;Houslay et al. 2017) to generate approximate 95% CI on all parameters.
Note that fitting a multivariate structure to data in 'long' rather than 'wide' format means that here we group by identity, but restrict the residual variance to effectively 0 (as each individual is only measured once in each 'repeat').