G.inverse {ASRgenomics} | R Documentation |
Obtains the inverse of the genomic relationship matrix G
Description
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).
Usage
G.inverse(
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
)
Arguments
G |
Input of the symmetric genomic relationship matrix |
A |
Input of the pedigree relationship matrix |
rcn.thr |
A threshold for identifying the |
blend |
If |
pblend |
If blending is requested this is the proportion of the identity matrix |
bend |
If |
eig.tol |
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 = |
align |
If |
digits |
Set up the number of digits in used to round the output matrix (default = |
sparseform |
If |
message |
If |
Value
A list with three of the following elements:
Ginv
: the inverse of\boldsymbol{G}
matrix in full form (only ifsparseform = FALSE
).Ginv.sparse
: the inverse of\boldsymbol{G}
matrix in sparse form (only ifsparseform = TRUE
).status
: the status (ill-conditioned
orwell-conditioned
) of the inverse of\boldsymbol{G}
matrix.rcn
: the reciprocal conditional number of the inverse of\boldsymbol{G}
matrix.
References
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.
Examples
# 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]
GINV$status