if (FALSE) {
library(BGLR)
data(wheat)
X<-wheat.X
K<-wheat.A
y<-wheat.Y
#Example 1, Spike Slab regression
ETA1<-list(list(X=X,model="SpikeSlab"))
fm1<-Multitrait(y=y,ETA=ETA1,nIter=1000,burnIn=500)
#Example 2, Ridge Regression
ETA2<-list(list(X=X,model="BRR"))
fm2<-Multitrait(y=y,ETA=ETA2,nIter=1000,burnIn=500)
#Example 3, Random effects with user defined covariance structure
#for individuals derived from pedigree
ETA3<-list(list(K=K,model="RKHS"))
fm3<-Multitrait(y=y,ETA=ETA3,nIter=1000,burnIn=500)
#Example 4, Markers and pedigree
ETA4<-list(list(X=X,model="BRR"), list(K=K,model="RKHS"))
fm4<-Multitrait(y=y,ETA=ETA4,nIter=1000,burnIn=500)
#Example 5, recursive structures for within subject covariance matrix
M1 <- matrix(nrow = 4, ncol = 4, FALSE)
M1[3, 2] <- M1[4, 2] <- TRUE # Adding recursion from trait 2 onto traits 3 and 4
M1[4, 3] <- TRUE # Adding recursion from trait 3 on trait 4
ETA5<-list(list(K=K,model="RKHS",Cov=list(type="REC",M=M1)))
fm5<-Multitrait(y=y,ETA=ETA5,nIter=1000,burnIn=500)
#Example 6, diagonal residual covariance matrix with the predictor
#used in example 5
residual1<-list(type="DIAG")
fm6<-Multitrait(y=y,ETA=ETA5,resCov=residual1,nIter=1000,burnIn=500)
}
Run the code above in your browser using DataLab