# LHD: Program for Constructing Latin Hypercube Designs

## Introduction

Latin hypercubes (LHs) were designs introduced by McKay, Beckman & Conover (1979) for computer experiments. An nxk LH can be represented by a design matrix Xnxk with n rows (runs) and k columns (factors), each of which includes n uniformly spaced levels. An LH is called an orthogonal LH (OLH) if each pair of columns of this LH has zero correlation. Examples of OLHs can be found in Ye (1998), Cioppa & Lucas (2007) and Nguyen (2008). OLHs are generally inflexible with respect to the numbers of runs and factors and poor with respect to the space-filling property. The OLHs of Steinberg & Lin (2006), for example, are available for nearly n-1 columns in n runs only when n=16, 256, 65 or 536.

LHD is a Gendex module for constructing near-OLHs with good space-filling property using the algoithm described in Nguyen & Lin (2012). The near-orthogonal OLHs constructed by LHD are quite good compared to those of Cioppa & Lucas (2007) and those in http://www.ams.sunysb.edu/~kye/olh.html with respect to both orthogonality and space-filling properties.

## Using LHD

Let's assume all Gendex class files are in the directory c:\gendex and suppose you want to construct a resolvable LHD of size (n,k)=(8,4) (Example 1). At the working directory, type the following command at the Command Prompt (case is important):

`java -cp c:\gendex LHD`

The LHD GUI will pop up. Enter 4 in the Number of factors field and 8 in the Number of runs field, the LHD window will become: Now click START, LHD will start running and after try 222, the plan of the constructed LHD for this try pops up in the LHD output window (as the f value reaches 0) and then LHD stops: The START button has been changed to the RESET one. If you click this RESET button, the output will disappear and you can use LHD for a new design problem. Note that the default random seed is the one obtained from the system clock and the default number of tries is 1000. You can change these default values if you wish to.

## Output

The result of the best try is displayed in the LHD output window and is also saved in the file LHD.htm in the working directory. This file can be read by a browser such as IE or Google Chrome. Information for this try includes:

1. Try number;
2. The number of iterations;
3. f, the objective function. f=0 when the constructed LH is an OLH.
4. |R|, the determinant of the correlation matrix R;
5. rmax, the maximum correlation in terms of absolute value of R;
6. rave, the average of the absolute value of the pair-wise correlations;
7. Mm distance, the Euclidean maximin distance (cf. Cioppa & Lucas, 2007). For this space-filling measure, the larger the better.
8. ML2, the modified L2 discrepancy (cf. Cioppa & Lucas, 2007). For this space-filling measure, the smaller the better.
9. The design plan and the associated random seed;
10. X'X matrix;
11. R, correlation matrix;
12. The time in seconds LHD used to construct this design.

## Examples

1. An OLH of size (n,k)=(8,4) (http://designcomputing.net/gendex/lhd/l1.html).
2. An OLH of size (n,k)=(9,5) (http://designcomputing.net/gendex/lhd/l2.html).
3. An OLH of size (n,k)=(17,8) (http://designcomputing.net/gendex/lhd/l3.html).
4. An OLH of size (n,k)=(33,9) (http://designcomputing.net/gendex/lhd/l4.html).
5. An OLH of size (n,k)=(33,11) (http://designcomputing.net/gendex/lhd/l5.html).
6. A near-OLH of size (n,k)=(65,16) (http://designcomputing.net/gendex/lhd/l6.html).
7. A near-OLH of size (n,k)=(129,22) (http://designcomputing.net/gendex/lhd/l7.html).

Notes:

• Example 3: This OLH was constructed by adding an orthogonal column to the OLH of size (n,k)=(17,7) of size Cioppa & Lucas (2007).
• Examples 4-7: The Mm distance criterion was used to construct the near-OLHs in these two examples.

## References

Cioppa, T. M. & Lucas, T.W. (2007) Efficient nearly orthogonal and space-filling Latin Hypercubes. Technometrics 49, 45-55.
McKay, M. D., Beckman, R.J., and 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, 239-245.
Nguyen, N-K. (2008) A new class of orthogonal Latin hypercubes. Statistics and Applications, 6, 119-123 (New Series).
Nguyen, N-K. & Lin D.K.J. (2012) A Note on near-Orthogonal Latin Hypercubes with good space filling properties. Journal of Statistics Theory & Practice 6, 492-500.
Ye, K. Q. (1998) Orthogonal Latin Hypercubes and their application in computer experiments. J. of the American Statistical Association 93, 1430-1439.

©2000-20124 Design Computing