Learn R Programming

rrBlupMethod6 (version 1.2)

rrBlupRotation: rrBlupRotation -- linear transformation for the adjusted means and the design matrices

Description

This function implements the rotation described in Piepho et al. (2011) thus the assumption of $R = I\sigma^2$ in function rrBlupM6 is satisfied.

Usage

rrBlupRotation(y, X = matrix(1,nrow=n, ncol=1), Z, R)

Arguments

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 y. The dimension of the matrix must be no. phenotypes (rows) times no. markers (columns). The coding must be 1 and -1 for the two homozygous genotypes.
R
Variance-covariance structure of the adjusted means

Value

  • A list with three components [object Object],[object Object],[object Object]

Details

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.

See Also

rrBlupMethod6,rrBlupM6

Examples

Run this code
## 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)

Run the code above in your browser using DataLab