Perform spectral decomposition for \(G = ZKZ'\) or \(SGS\) where \(S = I - X(X'X)^{-1}X\).
spectralG.cpp(
ZETA,
ZWs = NULL,
X = NULL,
weights = 1,
return.G = TRUE,
return.SGS = FALSE,
spectral.method = NULL,
tol = NULL,
df.H = NULL
)
The spectral decomposition results of G.
Eigen vectors of G.
Eigen values of G.
Estimator for \(\sigma^2_e\)
Eigen vectors of SGS.
Eigen values of SGS.
A list of variance (relationship) matrix (K; \(m \times m\)) and its design matrix (Z; \(n \times m\)) of random effects. You can use only one kernel matrix. For example, ZETA = list(A = list(Z = Z, K = K)) Please set names of list "Z" and "K"!
A list of additional linear kernels other than genomic relationship matrix (GRM). We utilize this argument in RGWAS.multisnp function, so you can ignore this.
\(n \times p\) matrix. You should assign mean vector (rep(1, n)) and covariates. NA is not allowed.
If the length of ZETA >= 2, you should assign the ratio of variance components to this argument.
If thie argument is TRUE, spectral decomposition results of G will be returned. (\(G = ZKZ'\))
If this argument is TRUE, spectral decomposition results of SGS will be returned. (\(S = I - X(X'X)^{-1}X\), \(G = ZKZ'\))
The method of spectral decomposition. In this function, "eigen" : eigen decomposition and "cholesky" : cholesky and singular value decomposition are offered. If this argument is NULL, either method will be chosen accorsing to the dimension of Z and X.
The tolerance for detecting linear dependencies in the columns of G = ZKZ'. Eigen vectors whose eigen values are less than "tol" argument will be omitted from results. If tol is NULL, top 'n' eigen values will be effective.
The degree of freedom of K matrix. If this argument is NULL, min(n, sum(nrow(K1), nrow(K2), ...)) will be assigned.