correlatedLHS(lhs::randomLHS(30, 2),
marginal_transform_function = function(W, ...) {
W[,1] <- qnorm(W[,1], 1, 3)
W[,2] <- qexp(W[,2], 2)
return(W)
},
cost_function = function(W, ...) {
(cor(W[,1], W[,2]) - 0.5)^2
},
debug = FALSE,
maxiter = 1000)
Run the code above in your browser using DataLab