J <- 6
K <- 3
B <- matrix(rnorm(J * K), nrow = J)
D <- runif(J)
S <- tcrossprod(B) + diag(D)
a <- -(2 + runif(J))
b <- 2 + runif(J)
M <- 1e4
Z <- matrix(rnorm(K * M), nrow = K)
lpRR(lower = a, upper = b, B = B, D = D, Z = Z)
Run the code above in your browser using DataLab