G.inverse {ASRgenomics} | R Documentation |
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.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
)
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 |
A list with three of the following elements:
Ginv
: the inverse of \boldsymbol{G}
matrix in full form (only if sparseform = FALSE
).
Ginv.sparse
: the inverse of \boldsymbol{G}
matrix in sparse form (only if sparseform = TRUE
).
status
: the status (ill-conditioned
or well-conditioned
) of
the inverse of \boldsymbol{G}
matrix.
rcn
: the reciprocal conditional number of the inverse of \boldsymbol{G}
matrix.
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]
GINV$status