| hypcube_lhs | R Documentation |
Generates a Latin Hypercube Sampling (LHS) design matrix over the hypercube.
hypcube_lhs(n, d, lbound = NA_real_, ubound = NA_real_)
n |
Integer. The number of samples points of the hypercube. |
d |
Integer. The the dimension of the hypercube. |
lbound |
Numeric vector of length |
ubound |
Numeric vector of length |
A n x d matrix containing the LHS design. Each
element is scaled to the range defined by lbound and
ubound.
McKay, M.D., Beckman, R.J., Conover, W.J. (1979) A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics. 21(2), 239–-245 (reprinted in 2000: Technometrics 42(1), 55–61).
Owen, A. B. (1992b) A central limit theorem for Latin hypercube sampling. JRSS Series B 54, 541-551.
Stein, M. (1987) Large sample properties of simulations using Latin hypercube sampling. Technometrics 29, 143-151.
x = hypcube_lhs(100, 2)
plot(x, xlim = c(0,1), ylim = c(0,1))
rug(x[,1]); rug(x[,2], side = 2)
x = hypcube_lhs(100, 2, lbound = c(-5,1), ubound = c(10,3))
plot(x, xlim = c(-5,10), ylim = c(1,3))
rug(x[,1]); rug(x[,2], side = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.