Y=matrix(1:12,4,3) # 4 solutions with 3 traits
Q=matrix(sample(0:1,32,replace = TRUE),nrow=4,ncol=8) # coancestry for each solution
D=diag(8)
b=rep(1,3)
lambda=0.5
ocsFun(Y=Y,Q=Q,D=D,b=b, lambda=lambda) # Yb - d where d is QAQ' and A is the LD between QTNs
Run the code above in your browser using DataLab