wgr(y,gen,it=1500,bi=500,th=1,bag=1,rp=TRUE,iv=FALSE,pi=0, df=5,R2=0.5,eigK=NULL,EigT=0.05,RO=FALSE,verb=FALSE)
NA
is allowed.
$y = mu + Xg + u + e$,
where $y$ is the response variable, $mu$ is the intercept, $X$ is the genotypic matrix, $g$ is the product of two terms ($g = bg$), $b$ is the effect of an allele substitution, $d$ is an indicator variable that define whether or not the marker should be included into the model, $u$ is the polygenic term and $e$ is the residual term.
Users can obtain four WGR methods out of this function: BRR (pi=0,iv=F), BayesA (pi=0,iv=T), BayesB (pi=0.8,iv=T) and BayesC (pi=0.8,iv=F). The full theoretical basis of each model is described by de los Campos et al. (2013).
Gibbs sampler that updates regression coefficients is adapted from GSRU algorithm (Legarra and Misztal 2008). The variable selection works through the unconditional prior algorithm proposed by Kuo and Mallick (1998). The polygenic term is solved by Bayesian algorithm of reproducing kernel Hilbert Spaces proposed by de los Campos et al. (2010).
de los Campos, G., Hickey, J. M., Pong-Wong, R., Daetwyler, H. D., and Calus, M. P. (2013). Whole-genome regression and prediction methods applied to plant and animal breeding. Genetics, 193(2), 327-345.
de los Campos, G., Gianola, D., Rosa, G. J., Weigel, K. A., & Crossa, J. (2010). Semi-parametric genomic-enabled prediction of genetic values using reproducing kernel Hilbert spaces methods. Genetics Research, 92(04), 295-308.
Kuo, L., & Mallick, B. (1998). Variable selection for regression models. Sankhya: The Indian Journal of Statistics, Series B, 65-81.
Legarra, A., & Misztal, I. (2008). Technical note: Computing strategies in genome-wide selection. Journal of dairy science, 91(1), 360-366.
data(tpod)
gen = gen[,seq(1,376,5)]
# BLUP
BRR = wgr(y,gen,iv=FALSE,pi=0,bag=0.5,rp=TRUE,it=400,bi=50)
cor(y,BRR$hat)
# BayesA
BA = wgr(y,gen,iv=TRUE,pi=0,bag=0.5,rp=TRUE,it=400,bi=50)
cor(y,BA$hat)
# BayesB
BB = wgr(y,gen,iv=TRUE,pi=.5,bag=0.5,rp=TRUE,it=400,bi=50)
cor(y,BB$hat)
# BayesC
BC = wgr(y,gen,iv=FALSE,pi=.5,bag=0.5,rp=TRUE,it=400,bi=50)
cor(y,BC$hat)
Run the code above in your browser using DataLab