Practical 4: BLUP, shrinkage and prediction uncertainty
Learning objectives
Distinguish breeding values from phenotypes and fixed group effects; calculate BLUP under a pedigree model; explain shrinkage and information from relatives; and distinguish prediction reliability from observed prediction accuracy.
Continue from Practical 3. You need base R, qgg and the shared helper script. This practical uses the same mouse data and founder base. Data checks and preparation are repeated so the page runs independently.
VA <-unname(fitA$theta["A"])VE <-unname(fitA$theta["E"])
The model is \(y=Xb+u+e\), with \(\operatorname{Var}(u)=A\sigma_A^2\) and independent residual variance \(I\sigma_E^2\). Estimated variance components give empirical BLUP: prediction conditional on the fitted components. Shared-litter/maternal effects are absent from this model, so model adequacy matters.
2. Separate the parts of a phenotype prediction
The fitted prediction is \(\hat y_i=x_i^T\hat b+\hat u_i\). The fixed part describes sex and replicate contrasts; \(\hat u_i\) is the predicted additive genetic deviation relative to the pedigree base. Residuals are \(y_i-\hat y_i\).
Question 1. Why can two mice with similar body weights receive different breeding-value predictions?
Suggested answer
Their sex/replicate adjustments and relatives’ records may differ. Phenotype ranking mixes group means, additive effects and residual sources. BLUP combines adjusted records using the relationship and variance model. A higher prediction concerns the defined trait and base; it does not automatically imply a better multivariate breeding objective.
3. Calculate BLUP directly
For \(V=A\sigma_A^2+I\sigma_E^2\),
\[\hat b=(X^TV^{-1}X)^{-1}X^TV^{-1}y,\qquad
\hat u=\sigma_A^2 A V^{-1}(y-X\hat b).\]
The following base-R calculation verifies the package prediction at its fitted variance components.
Show R code
V <- VA*K +diag(VE, length(y))Vi <-chol2inv(chol(V))ViX <- Vi %*% XCb <-solve(crossprod(X, ViX))b_direct <- Cb %*%crossprod(X, Vi %*% y)u_direct <-drop(VA*K %*% Vi %*% (y-X %*% b_direct))stopifnot(max(abs(u_direct-u_hat)) <1e-7,max(abs(b_direct-fitA$b)) <1e-7)
Question 2. What happens when residual variance is large relative to additive variance?
Suggested answer
A record carries less information about its underlying breeding value. Predictions generally shrink more toward the model’s reference expectation. The amount depends on the whole information structure, not only one phenotype.
An own-record illustration
For one noninbred, unrelated individual with known fixed mean, \(u\sim N(0,\sigma_A^2)\) and \(e\sim N(0,\sigma_E^2)\). Its prediction from an adjusted phenotype \(y^*\) is \(\hat u=h^2y^*\), with \(h^2=\sigma_A^2/(\sigma_A^2+\sigma_E^2)\). This scalar illustration does not replace the mouse pedigree analysis.
Figure 1: Own-record shrinkage at different assumed heritabilities; the group mean is known in this illustration.
4. Explore pedigree predictions
Show R code
local({ old <-par(mfrow=c(1,2)); on.exit(par(old))plot(y, u_hat, pch=16, cex=0.5, col="#247BA0",xlab="Observed body weight", ylab="Pedigree breeding value")hist(drop(fitA$e), breaks=25, col="#86B7A3", border="white",xlab="Model residual", main="Residual distribution")})
Figure 2: Predicted breeding values and model residuals for recorded mice. Association with input phenotypes is not validation accuracy.
A residual histogram can identify patterns worth investigating; it cannot prove independence or eliminate omitted family effects. Correlation with a phenotype already used for fitting is an in-sample association, not evidence of predictive accuracy.
5. Quantify model-based uncertainty
With unknown fixed effects accounted for, define
\[P=V^{-1}-V^{-1}X(X^TV^{-1}X)^{-1}X^TV^{-1}.\]
The prediction-error covariance at supplied variance components is
\[C_u=\sigma_A^2 A-\sigma_A^4 APA.\]
Its diagonal contains prediction-error variances (PEV). A model-based reliability is \(1-PEV_i/(A_{ii}\sigma_A^2)\); its square root is often called model-based accuracy. These plug-in quantities ignore uncertainty in the estimated variance components and do not provide empirical validation against true breeding values.
Show R code
P <- Vi - ViX %*% Cb %*%t(ViX)# Compute the diagonal without storing another full covariance matrix.pev <- VA*diag(K) - VA^2*rowSums((K %*% P)*K)reliability <-1-pev/(VA*diag(K))stopifnot(all(pev >=-1e-8), all(reliability >=-1e-8),all(reliability <=1+1e-8))summary(reliability)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.4819 0.4970 0.5000 0.4977 0.5005 0.5015
# Independent scalar check: own record, known mean, VA=2, VE=3.scalar_pev <-2-2^2/(2+3)stopifnot(abs(1-scalar_pev/2-2/(2+3)) <1e-12)
Question 3. Does the highest breeding-value prediction necessarily have the greatest reliability?
Suggested answer
No. Predicted merit and precision answer different questions. Reliability depends on information, relationships and variance assumptions. True breeding values are unavailable for these mice; their empirical prediction accuracy cannot be read from this table.
Prediction from one information source
The own-record example is a special case of prediction from an average of related individuals’ records. For a noninbred candidate, let \(a'\) be its additive relationship to each of \(n\) recorded individuals, and \(a''\) the relationship between each distinct pair of recorded individuals. Assume each record has variance \(V_P\), additive variance is \(V_A=h^2V_P\), the population mean \(\mu\) is known, and residual deviations are independent. Then
For a coherent covariance model, its reliability and model-based accuracy are
\[r^2=a'b,\qquad r=\sqrt{a'b}.\]
For example, \(a'=a''=0.5\), \(n=10\) and \(h^2=0.5\) give \(b=10/13\), reliability \(5/13\) and accuracy \(\sqrt{5/13}\), about 0.620. Reporting \(a'b\) as accuracy confuses the squared correlation with the correlation.
Relationships, heritability and record counts must describe a valid joint covariance model; they cannot always be varied independently. In particular, \(a'b\) must lie between zero and one, though this bound alone does not validate every underlying relationship. Shared residual effects or an estimated population mean require additional covariance terms. This compact model illustrates the information principle; the mouse BLUP analysis above uses the full relationship matrix and accounts for unknown fixed effects.
Exercises
Compare ranking by phenotype and by predicted breeding value. How do group adjustments affect interpretation?
Identify a mouse with relatively low reliability. Describe what additional information might help.
Explain why retaining only the largest predicted values does not evaluate response to selection.
More informative own/relative records can improve precision under an appropriate model. Selection response also depends on mating, inheritance, the objective and the next generation’s environment. gsel owns decision policies and gsim biological simulation; neither fits this pedigree evaluation.
Interactive exploration
Open Breeding Value Estimation from a Single Information Source to explore how relationships, heritability and the number of records affect prediction. Change one input at a time, predict the direction of the effect and connect the result to the one-source model above.
Next practical
Practical 5 replaces pedigree expectations with a genomic relationship model and separates agreement between predictions from validation on held-out records.