cgrm | R Documentation |
Based on a coefficient-matrix (i.e. marker matrix) \mathbf{X}
that will be scaled column-wise, a weight-vector \mathbf{w}
and a shrinkage parameter \lambda
, cgrm
returns
the following similarity matrix:
\mathbf{G} = (1-\lambda) \frac{\mathbf{X D X}^{'}}{\sum\mathbf{w}} + \mathbf{I}\lambda
where \mathbf{D}
= diag(\mathbf{w})
.
A weighted genomic relationship matrix allows running TA-BLUP as described in Zhang et al. (2010).
cgrm(X, w = NULL, lambda=0)
X |
coefficient matrix |
w |
numeric vector of weights for every column in X |
lambda |
numeric scalar, shrinkage parameter |
...
Similarity matrix with dimension nrow(X)
Claas Heuer
de los Campos, G., Vazquez, A.I., Fernando, R., Klimentidis, Y.C., Sorensen, D., 2013. "Prediction of Complex Human Traits Using the Genomic Best Linear Unbiased Predictor". PLoS Genetics 9, e1003608. doi:10.1371/journal.pgen.1003608
Zhang Z, Liu J, Ding X, Bijma P, de Koning D-J, et al. (2010) "Best Linear Unbiased Prediction of Genomic Breeding Values Using a Trait-Specific Marker-Derived Relationship Matrix". PLoS ONE 5(9): e12648. doi:10.1371/journal.pone.0012648
cgrm.A
, cgrm.D
.
# generate random data
rand_data(100,500)
weights <- (cor(M,y)**2)[,1]
G <- cgrm(M,weights,lambda=0.01)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.