This example illustrates how to fit ridge regression BLUP using the rrBLUP R package.
Data
We will use the maize data available in the synbreedData R package.
rm(list = ls())
library(synbreedData)
data(maize)
`?`(maize)
names(maize)
y <- maize$pheno[, 1, 1]
W <- maize$geno
W[W == 0] = -1 # convert 0 to -1
map <- maize$map
Ridge regression BLUP
The mixed.solve()
function implements ridge regression BLUP.
# install.packages('rrBLUP')
library(rrBLUP)
`?`(mixed.solve)
fit <- mixed.solve(y = y, Z = W)
Results
fit$beta # intercept
head(fit$u) # marker effects
fit$Vu # marker genetic variance
fit$Ve # residual variance
fit$Ve/fit$Vu # lambda