You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where $\mathbf{y}$ is an $n\times 1$ vector of phenotypes, $\mu$ is an intercept, $\mathbf{u}\sim MVN(\mathbf{0},\mathbf{G}\sigma^2_u)$ is a multivariate normal random vector with zero mean and a covariance matrix proportional to $\mathbf{G}$, and $\boldsymbol{\varepsilon}\sim MVN(\mathbf{0},\mathbf{I}\sigma^2_\varepsilon)$ is a vector of independent model residuals.
Here $\mathbf{G}$ is an $n\times n$ positive semi-definite relationship matrix (e.g., a genomic relationship matrix computed from markers, or a pedigree-based matrix), $\sigma^2_u$ is the variance parameter associated with $\mathbf{G}$, and $\sigma^2_\varepsilon$ is the residual variance.
Parameterizations
There are many equivalent ways to parameterize a GBLUP model, as a Gaussian process (as described above), as a linear regression on SNPs, or as a linear regression of factorizations of the SNP ($\mathbf{X}$) or the genomic relationship matrix. Below we show six ways to fit the same model, each based on a specific parameterization.
BGLR Fits these Gaussian models using the eigenvalue decomposition og G. The eigenvalue decomposition is computed internally using
eigen().
G=tcrossprod(scale(X,center=TRUE,scale=FALSE))
G=G/mean(diag(G)) # scaling G to have an average diagonal value of 1.fm2=BGLR( y=y,ETA=list(G=list(K=G,model='RKHS')),
nIter=nIter,burnIn=burnIn,saveAt='eig_'
)
varE=scan( 'eig_varE.dat')
varU=scan('eig_ETA_G_varU.dat')
h2_2=varU/(varU+varE)
When a genomic relationship matrix is provided to BGLR and the model is RKSH, internally, BGLR performs the eigenvalue decomposition of the GRM.
This strategy can be used to avoid computing the eigen-decomposition internally. This can be useful if a model will be fitted several times (e.g., cross-validation).
(5) Using the Cholesky decompositon and model='BRR'
This approach won't work if G is not positive definite; in our case the matrix is positive semi-definite, we can make it positive definite by adding a small constant to the diagonal.