Estimate how accurately a genomic BLUP predicts the performance of genotypes whose phenotypes are held out. For each fold the variance components are estimated by REML on the training genotypes, the held-out breeding values are predicted from the genomic relationship matrix (\(\hat{u}_V = K_{VT}(K_{TT} + \delta I)^{-1}(y_T - X_T\hat\beta)\)), and the predictions are compared with the observed phenotypes. The main metric is prediction accuracy, the correlation between predicted and observed across the held-out genotypes. bias is the slope of observed on predicted (1 is unbiased).
Arguments
- y
Numeric vector of phenotypes, one per genotype, aligned to the rows of
K.- K
An
n x ngenomic (or pedigree) relationship matrix.- X
Optional
n x pfixed-effect design matrix (an intercept is used whenNULL).- folds
Number of cross-validation folds (default 5).
- repeats
Number of independent fold partitions to average over (default 1). Repeated CV stabilises the estimate.
- seed
Optional integer seed for reproducible fold assignment.
- tol
PSD / symmetry tolerance for the spectral decomposition.
Value
An fb_gblup_cv object: accuracy (pooled predicted-observed
correlation), accuracy_per_fold, bias (pooled observed-on-
predicted slope), predicted (out-of-fold predictions in input
order, averaged over repeats), h2 (REML heritability on the full
data), and metadata.