Statistical analysis
All statistical analyses were ran in R v. 3. 4. 3. Cortisol levels and basal metabolic rate were analysed for the parents using a linear model with environment (poor vs enriched), and body weight as predictors. We used GLM with a quassipoisson link to account for overdispersion for the parental behavioural count data (no. contacts, no. inspections and activity) and a gaussian link for latency as a function of environment and body weight.
To test for parental effects on the offspring phenotype, we only analysed those phenotypes significantly different between parental environments, using the same model structure as described above but including also the parental values and environment as predictors. We used the multi-model approach implemented in the R package glmulti v 1.0.7 (Calcagno & de Mazancourt 2010) for model selection, which tests all possible models and all interactions, and considered models within 2 AIC units as being equivalent. To take into account potential parentage effects, we first selected the best-fit model (highest Akaike weight) using glmulti and then ran generalized mixed-models including parent of origin as a random factor using mlmRev v.1.0-7. Models were tested for overdispersion and individual observations (fish ID) were also taken into account when models displayed overdispersion. Outliers were identified using the function aout.pois in the package alphaOutlier.