kinship.BLUP: Genomic prediction by kinship-BLUP (deprecated)

View source: R/kinship.BLUP.R

kinship.BLUPR Documentation

Genomic prediction by kinship-BLUP (deprecated)

Description

***This function has been superseded by kin.blup; please refer to its help page.

Usage

kinship.BLUP(y, G.train, G.pred=NULL, X=NULL, Z.train=NULL, 
     K.method="RR", n.profile=10, mixed.method="REML", n.core=1)

Arguments

y

Vector (n.obs \times 1) of observations. Missing values (NA) are omitted.

G.train

Matrix (n.train \times m) of unphased genotypes for the training population: n.train lines with m bi-allelic markers. Genotypes should be coded as {-1,0,1}; fractional (imputed) and missing (NA) alleles are allowed.

G.pred

Matrix (n.pred \times m) of unphased genotypes for the prediction population: n.pred lines with m bi-allelic markers. Genotypes should be coded as {-1,0,1}; fractional (imputed) and missing (NA) alleles are allowed.

X

Design matrix (n.obs \times p) of fixed effects. If not passed, a vector of 1's is used to model the intercept.

Z.train

0-1 matrix (n.obs \times n.train) relating observations to lines in the training set. If not passed the identity matrix is used.

K.method

"RR" (default) is ridge regression, for which K is the realized additive relationship matrix computed with A.mat. The option "GAUSS" is a Gaussian kernel (K = e^{-D^2/θ^2}) and "EXP" is an exponential kernel (K = e^{-D/θ}), where Euclidean distances D are computed with dist.

n.profile

For K.method = "GAUSS" or "EXP", the number of points to use in the log-likelihood profile for the scale parameter θ.

mixed.method

Either "REML" (default) or "ML".

n.core

Setting n.core > 1 will enable parallel execution of the Gaussian kernel computation (use only at UNIX command line).

Value

$g.train

BLUP solution for the training set

$g.pred

BLUP solution for the prediction set (when G.pred != NULL)

$beta

ML estimate of fixed effects

For GAUSS or EXP, function also returns

$profile

log-likelihood profile for the scale parameter

References

Endelman, J.B. 2011. Ridge regression and other kernels for genomic selection with R package rrBLUP. Plant Genome 4:250-255.

Examples

#random population of 200 lines with 1000 markers
G <- matrix(rep(0,200*1000),200,1000)
for (i in 1:200) {
  G[i,] <- ifelse(runif(1000)<0.5,-1,1)
}

#random phenotypes
g <- as.vector(crossprod(t(G),rnorm(1000)))
h2 <- 0.5 
y <- g + rnorm(200,mean=0,sd=sqrt((1-h2)/h2*var(g)))

#split in half for training and prediction
train <- 1:100
pred <- 101:200
ans <- kinship.BLUP(y=y[train],G.train=G[train,],G.pred=G[pred,],K.method="GAUSS")

#correlation accuracy
r.gy <- cor(ans$g.pred,y[pred])

rrBLUP documentation built on Jan. 7, 2023, 1:08 a.m.