Description Usage Arguments Details Value Author(s) See Also Examples
This function implements the rotation described in Piepho
et al. (2011) thus the assumption of R = I sigma2
in function rrBlupM6
is satisfied.
1 | rrBlupRotation(y, X = matrix(1,nrow=n, ncol=1), Z, R)
|
y |
Numeric vector with adjusted means of the genotypes. |
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 |
R |
Variance-covariance structure of the adjusted means |
Please see Piepho et al. (2011) and Schulz-Streeck et
al. (2012) for details on the rotation approach. The
variance-covariance structure R can, for example, be obtained
with the function vcov
from fitted (mer
) model objects,
or with the output option COV
for the LSMEANS
statement
in PROC MIXED
in SAS.
A list with three components
Numeric vector with the rotated adjusted means,
Rotated design matrix of the fixed effects and
Rotated design matrix with the marker information
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 | ## 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))
## simulate a random variance-covariance structure of the adjusted means
## (Note that this is just for demonstration purposes, the values are
## non-sensical!)
R <- matrix(rnorm(N*N),N,N)
diag(R) <- abs(diag(R))
R <- R + t(R)
## rotate
out_r <- rrBlupRotation(y, Z = Z, R = R)
## use rotated y,X and Z for computing marker effects and set sig2e = 1
out_RRBLUP_m6_r <- rrBlupM6(y = out_r$y_tilda,
X = out_r$X_tilda,
Z = out_r$Z_tilda,
sig2e = 1,
chunks = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.