Statistical analyses
We used mixed effect models fitted with ASReml-R implemented in R version 4.1.1 . We applied log-transformations (OFT Wall Distance; FST Food Latency ) and square root transformations (OFTTrack Length, Freezings ; FST Track Length, Time in Openand Freezings ) to improve Gaussian assumptions, before scaling to standard deviation units which facilitates multivariate modelling. Finally, we also multiplied the transformed and scaled data forFreezings (both assays), and Food Latency (FST) by -1. This sign reversal was to simplify biological interpretation of results by making high values correspond to a priori expectation of ‘bolder’ behaviour in all cases. Following these transformations, model residuals were (approximately) Gaussian with the exception of-(Food Latency) , which showed major departures from residual normality that could not be resolved. While analyses applied are broadly robust to deviations from normality , we nonetheless suggest statistical inferences for this trait should therefore be interpreted with some caution.
Among-individual variance in behavioural traits
We tested for among-individual variation in each of the OFT and FST traits using a series of univariate linear mixed models. For each trait, we fitted a model with fixed effects of: order (from 1-6 reflecting the order of individuals tested between experimental water changes), trialrepeat number for the individual (from 1-3), time of day (in minutes after midnight) and experimental arena used (tank A versus B). The FST traits of Track Length and -(Freezings) are analogous to OFT traits but were only recorded for the portion of the observation period while shrimp were trackable outside the food and shelter zones. Since both traits were square root transformed for analysis, we included the square root of time spent in the trackable part of the arena as an additional fixed effect in the model of these traits. All these fixed effects were included simply to control for potential nuisance variables unrelated to our hypotheses. Each model also contained a random effect of individual identity (ID), allowing us to estimate among-individual variance VI. For each trait, we then estimated repeatability (R) conditional on fixed effects as the proportion of phenotypic variance (VP ) explained by individual differences. Thus R=VP/(VI+ VR) where VR is the residual (within-individual) variance. For each trait we compared our model to a reduced version of the same model without the random effect of individual identity by likelihood ratio test (LRT) to assess the significance of VI. For testing a single variance component, we assumed twice the difference in log-likelihoods is distributed at a 50:50 mix of χ 2 on 0 and 1 DF following