Description Usage Arguments Details Author(s) References Examples
Solves the Linear Mixed Model and calculates Best Linear Unbiased Predictor (BLUP)
1 2 3 4 |
y |
Response variable |
X |
Design matrix for the fixed effects. When |
Z |
Design matrix for the random effects. When |
K |
Kinship relationships matrix. This can be a name of a binary file where the matrix is stored |
U |
Matrix with eigenvectors from spectral value decomposition of G = U D U' |
d |
Vector with eigenvalues from spectral value decomposition of G = U D U' |
indexK |
Vector of integers indicating which columns and rows will be read when |
h2 |
Heritability of the response variable. When |
BLUP |
|
method |
Either 'ML' (Maximum Likelihood) or 'REML' (Restricted Maximum Likelihood). Only 'ML' method is implemented in this version |
return.Hinv |
|
tol |
Maximum error between two consecutive solutions when solving the root |
maxIter |
Maximum number of iterations to run before convergence is reached |
interval |
Range of values in which the root is searched |
warn |
|
The basic linear mixed model that relates phenotypes with genetic values is of the form
where y is a vector with the response, b is the vector of fixed effects, g is the vector of the genetic values of the genotypes, e is the vector of environmental residuals, and X and Z are design matrices conecting the fixed and genetic effects with replicates. Genetic values are assumed to follow a Normal distribution as g ~ N(0,σ2uK), and environmental terms are assumed e ~ N(0,σ2eI).
The resulting vector of genetic values u = Z g will therefore follow u ~ N(0,σ2uG) where G = Z K Z'. In the un-replicated case, Z = I is an identity matrix, and hence u = g and G = K.
The values utst = (ui), i = 1,2,...,ntst, for a testing set are estimated using (as predictors) all available observations in a training set as
where H is a matrix of weights given by
where Gtst,trn is the sub-matrix of G whose rows correspond to the testing set and columns to the training set, Gtrn,trn is the sub-matrix corresponding to the training set, and λ0 = (1 - h2)/h2 is a shrinkage parameter expressed in terms of the heritability, h2 = σ2u/(σ2u + σ2e).
Paulino Perez, Marco Lopez-Cruz (lopezcru@msu.edu) and Gustavo de los Campos
VanRaden PM (2008). Efficient methods to compute genomic predictions. Journal of Dairy Science, 91(11), 4414–4423.
Zhou X, Stephens M (2012). Genome-wide efficient mixed-model analysis for association studies. Nature Genetics, 44(7), 821-824
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | require(SFSI)
data(wheatHTP)
X = scale(X[1:300,]) # Subset and scale markers
G = tcrossprod(X)/ncol(X) # Genomic relationship matrix
y = scale(Y[1:300,"YLD"]) # Subset response variable
# Training and testing sets
tst = sample(seq_along(y),ceiling(0.3*length(y)))
trn = seq_along(y)[-tst]
yNA <- y
yNA[tst] <- NA
fm = fitBLUP(yNA,K=G)
plot(y[tst],fm$u[tst]) # Predicted vs observed values in testing set
cor(y[tst],fm$u[tst]) # Prediction accuracy in testing set
cor(y[trn],fm$u[trn]) # Prediction accuracy in training set
fm$h2 # Heritability
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.