# NOT RUN {
N=50
nmarkers=500
Markers<-c()
for (i in 1:N){
Markers<-rbind(Markers,sample(-1:1,nmarkers, replace=TRUE))
}
markereffects<-rep(0,nmarkers)
markereffects[sample(1:nmarkers,nmarkers/2)]<-rnorm(nmarkers/2)
Markers[1:5,1:5]
K=Amat.pieces(Markers, pieces=5)
K[1:5,1:5]
# }
Run the code above in your browser using DataLab