G.inverse {ASRgenomics}R Documentation

Obtains the inverse of the genomic relationship matrix G


Generates the inverse of a genomic relationship matrix \boldsymbol{G} that is provided. This input matrix should be of the full form (n \times n) with individual names assigned to rownames and colnames. Several checks for the stability of the matrix are presented based on the reciprocal conditional number.

In case of an ill-conditioned matrix, options of blending, bending or aligning before inverting are available. These options will be deprecated (discontinued) in future versions of ASRgenomics as they can be better implemented in the function G.tuneup().

Based on procedures published by Nazarian and Gezan et al. (2016).


  G = NULL,
  A = NULL,
  rcn.thr = 1e-12,
  blend = FALSE,
  pblend = 0.02,
  bend = FALSE,
  eig.tol = NULL,
  align = FALSE,
  digits = 8,
  sparseform = FALSE,
  message = TRUE



Input of the symmetric genomic relationship matrix \boldsymbol{G} in full form (n \times n), to obtain its inverse (default = NULL).


Input of the pedigree relationship matrix \boldsymbol{A} to perform blending or aligning in full form. It should be of the same dimension as the \boldsymbol{G} matrix (n \times n) (default = NULL) (to be deprecated).


A threshold for identifying the \boldsymbol{G} matrix as an ill-conditioned matrix. Based on the reciprocal conditional number (default = 1e-12).


If TRUE a "blending" with identity matrix \boldsymbol{I} or pedigree relationship matrix \boldsymbol{A} (if provided) is performed (default = FALSE) (to be deprecated).


If blending is requested this is the proportion of the identity matrix \boldsymbol{I} or pedigree relationship matrix \boldsymbol{A} to blend for (default = 0.02) (to be deprecated).


If TRUE a "bending" is performed by making the matrix near positive definite (default = FALSE) (to be deprecated).


Defines relative positiveness (i.e., non-zero) of eigenvalues compared to the largest one. It determines which threshold of eigenvalues will be treated as zero (default = NULL) (to be deprecated).


If TRUE the genomic relationship matrix \boldsymbol{G} is aligned to the pedigree relationship matrix \boldsymbol{A} (default = FALSE) (to be deprecated).


Set up the number of digits in used to round the output matrix (default = 8).


If TRUE it generates an inverse matrix in sparse form to be used directly in asreml with required attributes (default = FALSE).


If TRUE diagnostic messages are printed on screen (default = TRUE).


A list with three of the following elements:


Nazarian A., Gezan S.A. 2016. GenoMatrix: A software package for pedigree-based and genomic prediction analyses on complex traits. Journal of Heredity 107:372-379.


# Example: An ill-conditioned matrix.

# Get G matrix.
G <- G.matrix(M = geno.apple, method = "VanRaden")$G
G[1:5, 1:5]

# Get the inverse of G.
GINV <- G.inverse(G = G, bend = FALSE, blend = FALSE, align = FALSE)
GINV$Ginv[1:5, 1:5]

[Package ASRgenomics version 1.1.3 Index]