# lhsDesign: Latin Hypercube Designs In DiceDesign: Designs of Computer Experiments

## Description

Simple (random) Latin Hypercube Design (randomized or centered) with n experiments in [0,1]^d.

## Usage

 `1` ```lhsDesign(n, dimension, randomized=TRUE, seed=NULL) ```

## Arguments

 `n ` number of experiments `dimension ` number of variables `randomized` TRUE for randomized LHS; FALSE for centered LHS `seed ` seed used to generate the random permutations and perturbations

## Details

This program builds a Latin Hypercube Design (LHD), also called a Latin Hypercube Sample (LHS), on the space [0,1]^d (with uniform probability measures). LHD aims at ensuring that each variable has its whole range well scanned: the range of each variable is divided into n equally probable stratas. Each stratum of each variable contains only one point of the LHD. Centered LHD is obtained by choosing for each point the center of the corresponding case, while randomized LHD is obtained by adding random perturbations inside each point case.

Once the sample is generated, the uniform sample from a column can be transformed to any distribution by using the quantile functions.

## Value

A list with components:

 `n ` the number of points `dimension ` the number of variables `design ` the design of experiments `randomized ` the type of LHD `seed ` the value of the seed

B. Iooss

## References

McKay M., Conover W. and Beckman R. (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.

Stein M. (1987) Large sample properties of simulations using Latin hypercube sampling, Technometrics, 29, 143-151.

LHD optimization (`maximinSA_LHS`,`discrepSA_LHS`,`maximinESE_LHS` ,`discrepESE_LHS`)

## Examples

 ```1 2 3 4 5 6 7``` ```n <- 20 dimension <- 2 out <- lhsDesign(n, dimension) out\$design ## Change the dimnames, adjust to range (-10, 10) and round to 2 digits xDRDN(out, letter = "T", dgts = 2, range = c(-10, 10)) ```

### Example output

```            [,1]       [,2]
[1,] 0.04277007 0.23830350
[2,] 0.74010541 0.84973176
[3,] 0.21628080 0.86533500
[4,] 0.48425548 0.60118647
[5,] 0.57897967 0.90915358
[6,] 0.36057781 0.14407402
[7,] 0.87049843 0.30769933
[8,] 0.52151581 0.67559468
[9,] 0.17946757 0.54340441
[10,] 0.96733871 0.59968098
[11,] 0.14045841 0.46088065
[12,] 0.32397879 0.01962452
[13,] 0.93594355 0.17547840
[14,] 0.07519417 0.43675089
[15,] 0.61620942 0.06241330
[16,] 0.84285117 0.39372446
[17,] 0.41597329 0.98619310
[18,] 0.66377888 0.29372121
[19,] 0.76716877 0.74469971
[20,] 0.28528564 0.75490960
T1     T2
1  -9.52  -5.48
2   4.91   7.18
3  -5.93   7.50
4  -0.39   2.03
5   1.57   8.41
6  -2.95  -7.42
7   7.61  -4.04
8   0.39   3.57
9  -6.69   0.84
10  9.61   2.00
11 -7.50  -0.87
12 -3.70 -10.00
13  8.96  -6.78
14 -8.85  -1.37
15  2.34  -9.11
16  7.03  -2.26
17 -1.80  10.00
18  3.33  -4.33
19  5.47   5.00
20 -4.50   5.21
```

DiceDesign documentation built on Feb. 13, 2021, 1:06 a.m.