Pedigree Analysis
We first fit a pedigree-based model with the random effects of animal and dam using MCMCglmm. This random effects-only model allowed us to confirm the model fit appropriately and returned the correct overall mean sex ratio. We used a threshold model, as is standard for binary or count trait values, modelling heritability on the underlying liability trait (de Villemereuil 2018) and achieved a model with good mixing of chains and acceptable autocorrelations (the majority <0.10; one of the six replicate chains had high autocorrelations of 0.18 and 0.19; removal of this chain from analysis did not affect analysis outcome). From this model, mean heritability on the liability scale was 0.237 (95% credible interval (CI): 0.00-0.51). Using QGglmm (de Villemereuil et al. 2016) we estimated trait values on the observed scale and found heritability for sex on the observed scale was 0.150 (95% CI: 0.0-0.33).
We next fit a model that included fixed effects of block and parental selection origin (i.e., are maternally and paternally inherited genes from male-biased (M) or female-biased (F) selection lines; four levels were possible: FF, FM, MF, MM, where the first letter indicates maternal gene source, and second letter indicates paternal gene source). No effect of block was present, but paternal by maternal combinations of male-biased or female-biased population origin did differ, with pMCMC <0.006 for each group relative to the reference group of female-biased lines in both paternal and maternal ancestry. We calculated heritability on both scales for this model integrating the variance from fixed effects to ensure our estimate is not inflated by the concomitant decrease in residual variance when fixed effects are partitioned out (de Villemereuil et al. 2018; de Villemereuil 2021). Heritability on the liability scale was 0.272 (95% CI: 0.136-0.437). On the observed scale, heritability for sex was 0.09 (95% CI: 0.034-0.143). Thus, accounting for the variance due to selection line differences did not change the heritability much but did substantially tighten up our credibility interval and provide us with a better estimate of heritability.