Learn R Programming

selection.index (version 2.0.0)

genomic_varcov: Genomic Variance-Covariance Matrix (\(\Gamma\))

Description

Computes genomic variance-covariance matrix (\(\Gamma\) or Gamma) from a matrix of Genomic Estimated Breeding Values (GEBVs).

\(\gamma\) (gamma) represents GEBV vectors obtained from genomic prediction models (e.g., GBLUP, rrBLUP, Genomic BLUP). This function computes Var(\(\gamma\)) = \(\Gamma\).

Usage

genomic_varcov(gebv_mat, method = "pearson", use = "complete.obs")

Value

Symmetric genomic variance-covariance matrix (n_traits x n_traits)

Arguments

gebv_mat

Matrix of GEBVs (n_genotypes x n_traits)

method

Character string specifying correlation method: "pearson" (default), "kendall", or "spearman"

use

Character string specifying how to handle missing values: "everything" (default), "complete.obs", "pairwise.complete.obs", etc. See cov for details.

Details

The genomic variance-covariance matrix \(\Gamma\) captures genetic variation as predicted by molecular markers. It is computed as:

where \(\gamma_i\) is the GEBV vector for genotype i and \(\mu_{\gamma}\) is the mean GEBV vector.

**Missing Value Handling:** - "complete.obs": Uses only complete observations (recommended) - "pairwise.complete.obs": Uses pairwise-complete observations (may not be PSD) - "everything": Fails if any NA present

When using pairwise deletion, the resulting matrix may not be positive semi-definite (PSD), which can cause numerical issues in selection indices.

**Applications:** In selection index theory: - Used in LGSI (Linear Genomic Selection Index) - Component of \(\Phi\) (phenomic-genomic covariance) - Component of A (genetic-genomic covariance)

References

Cerón-Rojas, J. J., & Crossa, J. (2018). Linear Selection Indices in Modern Plant Breeding. Springer International Publishing. Chapters 4 & 8.

Examples

Run this code
if (FALSE) {
# Simulate GEBVs
set.seed(123)
n_genotypes <- 100
n_traits <- 5
gebv_mat <- matrix(rnorm(n_genotypes * n_traits),
  nrow = n_genotypes, ncol = n_traits
)
colnames(gebv_mat) <- paste0("Trait", 1:n_traits)

# Compute genomic variance-covariance
Gamma <- genomic_varcov(gebv_mat)
print(Gamma)
}

Run the code above in your browser using DataLab