6. Multitrait, repeated-record and longitudinal models
Advanced notes: contents · Abbreviations
1 Multitrait models and the one-visit benchmark
The following specification uses the general multivariate mixed-model framework (Sorensen and Gianola, 2002); its one-visit identifiability example is an algebraic consequence of the stated covariance structure.
With effects stacked trait by trait, the four-trait model has
\[ y=X\beta+Z_a a+Z_h h+Z_f f+Z_c c+e, \]
where \(h\) denotes herd effects, \(f\) family effects and \(c\) permanent individual-environment effects, with mutually independent components and
\[ K_a=\Sigma_a\otimes H,\quad K_h=\Sigma_h\otimes I_h,\quad K_f=\Sigma_f\otimes I_f,\quad K_c=\Sigma_c\otimes I_{\rm animal}. \]
Here \(I_h\), \(I_f\) and \(I_{\rm animal}\) are identity matrices on their respective effect domains. For complete observations at one visit, \(R=\Sigma_e\otimes I_o\), where \(I_o\) is the identity on observation units. An observed-record selector \(S\) gives the observed covariance as \(S V_{\rm complete}S^\top\) when some traits are missing. Removing missing responses without consistently selecting incidence rows and residual blocks does not preserve the model.
Trait order and stacking order are mathematical inputs. For animal-major ordering, a permutation changes \(\Sigma\otimes H\) into \(H\otimes\Sigma\); the biological covariance is unchanged only when every associated vector and operator is permuted consistently.
1.1 Separating individual environment from residual variation
With one visit per animal and unrestricted trait covariance matrices, the individual-environment and residual components contribute
\[ (\Sigma_c+\Sigma_e)\otimes I_o \]
to the observed covariance. Consequently, a change \(\Delta\) added to \(\Sigma_c\) and subtracted from \(\Sigma_e\) preserves the likelihood whenever both remain admissible. Supplied values define a valid prediction problem, but the data alone cannot estimate this split.
The ambiguity does not automatically imply ambiguity in genetic prediction: holding their sum fixed preserves \(V\) and, with unchanged genetic cross-covariance, preserves \(\hat a\). Predictions of \(c\) itself depend on the selected split. Repeated visits, defensible covariance restrictions or external information can supply additional identification.
2 Multitrait covariance is not repeated-measurement covariance
Traits may be different biological outcomes measured together or at different occasions. In a conventional multitrait model, \(\Sigma_a\) describes genetic covariance between traits and residual covariance applies to traits sharing a residual unit. Two measurements on different visits do not share a residual block merely because they concern the same animal.
For an unstructured \(t\)-trait covariance, each component requires \(t(t+1)/2\) parameters. Genetic correlations \(\Sigma_{a,ij}/\sqrt{\Sigma_{a,ii}\Sigma_{a,jj}}\) share information across traits. Whether this improves prediction depends on sample size, covariance estimation and the relevance of the additional trait information to deployment. Trait rescaling must transform every affected covariance block consistently.
3 Longitudinal random regression
Random-regression estimation of genetic covariance functions is developed by Meyer (1998).
Represent an animal’s trajectory by \(a_i(t)=b(t)^\top u_i\), with a supplied basis \(b(t)\). If \(\operatorname{Cov}(u_i,u_j)=A_{ij}\Sigma_u\), then
\[ \operatorname{Cov}\{a_i(t),a_j(s)\}=A_{ij}b(t)^\top\Sigma_u b(s). \]
The prediction target may be a value at a particular age, a change between ages, a slope or an integrated trajectory. Each corresponds to a linear combination of coefficients and needs the full coefficient prediction-error variance (PEV) block. Extrapolation outside the observed time range can be highly sensitive to basis choice even when the numerical system is well solved.
Centering/scaling time improves conditioning. Changing from one full-rank basis to another preserves the model only if the coefficient covariance is transformed accordingly. Truncating the basis changes the model.
4 Residual correlation and irregular visits
The combination of random regression and parametric within-animal environmental correlation is treated by Meyer (2001).
For discrete equally spaced visits a first-order autoregressive [AR(1)] model can use \(R_{rs}=\sigma_e^2\rho^{|k_r-k_s|}\). The distance uses the true visit index, not row adjacency after deleting missing visits. For irregular times, an exponential model uses \(R_{rs}=\sigma_e^2\exp(-\phi|t_r-t_s|)\) with \(\phi>0\). A heterogeneous form multiplies the correlation by occasion-specific standard deviations. Duplicate times, residual units and independent blocks must be declared explicitly.
Genetic random regression, permanent environmental random regression and serial residuals explain different covariance structures. With sparse follow-up, those structures can be difficult to distinguish. Increasing basis dimension without additional independent information does not resolve this.
5 Factor-analytic trait or environment covariance
Sparse average-information fitting for factor-analytic and reduced-rank covariance models is described by Thompson et al. (2003). Its multi-environment setting provides methodological background, not evidence for every livestock application.
A factor-analytic covariance has \(\Sigma=\Lambda\Lambda^\top+\Psi\), with a diagonal nonnegative specific covariance \(\Psi\). It can reduce dimensionality and share information across environments. Loading rotations require constraints for interpretation; the implied covariance can be identified even when individual loadings are not uniquely oriented.
Factors do not automatically have biological labels. Their rank and specific variance assumptions should be assessed against prediction and covariance fit. A factor-analytic model is a structured alternative to a full unstructured covariance, not necessarily an exact computational shortcut.
5.1 Learning genetic dimensions from rich phenotypes
The genetic and environmental factor structures need not have the same rank or loadings. Choosing factors from total phenotypic variance alone can emphasize recording conditions rather than genetic covariance relevant to the objective. The genetic latent-factor work in Melsen et al. (2025) illustrates a plant-breeding route; its covariance estimation and replication assumptions must be checked before transferring the procedure to animal records.
With repeated high-dimensional features, a factor model may be combined with random regression. Estimation then concerns the loadings, coefficient covariance and residual process jointly or through an explicitly qualified staged procedure. Rank, time basis and smoothing choices are model choices to assess inside training, not numerical settings that automatically preserve a full unstructured model. The phenomics progression connects this covariance to trajectory and integral prediction targets.
6 Genotype-by-environment interaction
For a Bayesian reaction-norm formulation including uncertainty in the environmental covariate, see Su et al. (2006). That setting is broader than the supplied-basis example here.
Environments can be treated as correlated traits or represented through measured covariates in a reaction norm. An environmental mean effect belongs in the mean model; a genetic response to environment belongs in genetic covariance. A prediction in a new environment requires observed covariates or a declared cross-environment covariance. An arbitrary new environment label does not supply either.
Existing route-specific examples are in the pedigree tutorial, multitrait guide and longitudinal guide.
Implemented routes include incomplete multitrait pedigree models, longitudinal pedigree random regression, and standalone trait, basis, serial-residual and factor-analytic constructions in the YAML examples. Factor-analytic covariance is implemented natively and exposed through YAML, while the component R covariance constructor remains a separate exposure gap. Its stochastic optimisation and uncertainty limits differ from exact fitting; see model/backend coverage. The joint learned measurement models developed in the phenomics chapter are broader extensions.
Next: missing data and selection.
For applications to automated measurements and high-dimensional traits, see large-scale phenomics.