Statistical analysis
Thirty-three stickleback (size range 4.0-4.1) were used for this
analysis. Data from day three of the experiment was missing for four
fish resulting in a total number of observations, n = 95. We used the
software R v. 3.1.3 (http://www.r-project.org) (R Core Team 2012) for
all statistical analysis and visualization. Preliminary data exploration
showed that latency to explore and latency to forage were highly
correlated and that foraging at a sheltered or open food patch did not
appear to differ between individuals or day or trial. Therefore,
statistical analysis was focused on latency to explore and activity. The
statistical analysis and data visualization were done in R 4.0.3 (R Core
Team 2021), tidyverse 1.3.0. (Wickham, 2019) and the packages cited
below. All gathered data is presented in Supplementary Table 1.
First, we used lme4 1.1-27.1. (Bates et al., 2015) to fit a generalized
linear mixed model using a Poisson distribution to examine change in
latency to explore and activity across the three daily behavioral trials
and to get estimates of intercepts and slopes for each fish for both
behaviors. This allowed us to reduce the measurements of the three
trials too two values. The intercept represents the rank level of that
individual and in the current context highly reflects the initial
response of the fish to the trial, for example, if they started
exploring/foraging early in the first trial. The slope represents the
plasticity of the individual across trials and in the current context is
likely to reflect habituation to the trial, for example, a high negative
slope for latency to explore will show a fish that was initially
hesitant (first trial) but subsequently bolder. Note that fish that were
either bold or shy for all trials would both have estimated slopes close
to zero.
Second, we examined the correlation of individual behavior and stable
isotope niche. As estimates of the individual personality we used
intercept and slope for both latency to explore and activity. Slope was
included to also capture plasticity in behavior across trials. We used
two approaches to do this. First, we used a generalized linear model to
estimate the significance of the correlation of stable isotope values
(both δ13C and δ15N) to either
intercept or slope of the behavioral traits. A Poisson distribution was
used in these models. Second, we wanted to see if behavior correlated to
within individual variation in stable isotope niche. For that purpose,
we calculated the Euclidian distance from individual stable isotope
values of muscle samples and fin samples (reflecting different turnover
times). We then used that distance as the response variable in two
linear model with the intercept and slope of each of activity and
latency to explore as factors with an interaction effect. A Gaussian
distribution was used in this model. The residual distributions of all
models were examined using the R package DHARMa 0.4.4. (Hartig 2021).