Description Usage Arguments Details Value Author(s) See Also Examples
This function implements "Method 6" described in Piepho et al. (2011), a re-parametrization of Kang et al.'s (2008) mixed model formulation to allow for a fixed residual variance when using RR-BLUP for genomwide estimation of marker effects.
1 | rrBlupM6(y, X = matrix(1,nrow=n,ncol=1), Z, sig2e, chunks = as.integer(1))
|
y |
Numeric vector with phenotypic observations (for example the entry means). |
X |
Design matrix of fixed effects, including the intercept. By default, this is an all 1 column vector for the intercept. |
Z |
Matrix assigning marker genotypes
to phenotypes in |
sig2e |
The value of the residual variance, numeric vector of length 1. |
chunks |
Integer giving the number of chunks into which to split
the computation of ZZ'. Computing this matrix in chunks might have
computational advantages when the number of markers and observations
is very large and the available memory is low. The default is 1,
which computes ZZ' directly (i.e. as |
Please see Piepho et al. (2011) for details on the re-parametrization and the computation of ZZ' in chunks. Currently only bi-allelic markers are supported.
A list with three components
Numeric vector with the BLUP marker effects,
Numeric vector with the BLUE of the fixed effects and
Numeric vector of length 1 with the REML estimate of the marker effect variance
Torben Schulz-Streeck, Boubacar Estaghvirou, Frank Technow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## simulate a small data set (250 observations, 300 markers)
set.seed(3421475)
N <- 250
M <- 300
Z <- matrix(sample(c(1,-1),N * M, replace = TRUE),
nrow = N,
ncol = M)
## marker effects
u <- rnorm(M, 0, sqrt(1/M))
sig2e <- 1
y <- Z %*% u + rnorm(N,0,sqrt(sig2e))
out <- rrBlupM6(Z = Z, y = y, sig2e = sig2e)
## estimated marker effect variance
out$sig2u
## accuracy in validation set
Z.val <- matrix(sample(c(1,-1),N * M, replace = TRUE),
nrow = N,
ncol = M)
cor(Z.val%*% out$uhat, Z.val%*% u)
## compute ZZ' in chunks
out.chunks <- rrBlupM6(Z = Z, y = y, sig2e = sig2e, chunks = 6)
cor(Z.val%*% out.chunks$uhat, Z.val%*% u)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.