| SLHD {LHD} | R Documentation | 
Sliced Latin Hypercube Design (SLHD)
Description
SLHD returns a n by k LHD matrix generated by improved two-stage algorithm
Usage
SLHD(
  n,
  k,
  t = 1,
  N = 10,
  T0 = 10,
  rate = 0.1,
  Tmin = 1,
  Imax = 3,
  OC = "phi_p",
  p = 15,
  q = 1,
  stage2 = FALSE,
  maxtime = 5
)
Arguments
n | 
 A positive integer, which stands for the number of rows (or run size).  | 
k | 
 A positive integer, which stands for the number of columns (or factor size).  | 
t | 
 A positive integer, which stands for the number of slices.   | 
N | 
 A positive integer, which stands for the number of iterations. The default is set to be 10. A large value of   | 
T0 | 
 A positive number, which stands for the user-defined initial temperature. The default is set to be 10.  | 
rate | 
 A positive percentage, which stands for temperature decrease rate, and it should be in (0,1). For example, rate=0.25 means the temperature decreases by 25% each time. The default is set to be 10%.  | 
Tmin | 
 A positive number, which stands for the minimium temperature allowed. When current temperature becomes smaller or equal to   | 
Imax | 
 A positive integer, which stands for the maximum perturbations the algorithm will try without improvements before temperature is reduced. The default is set to be 5. For the computation complexity consideration,   | 
OC | 
 An optimality criterion. The default setting is "phi_p", and it could be one of the following: "phi_p", "AvgAbsCor", "MaxAbsCor", "MaxProCriterion".  | 
p | 
 A positive integer, which is the parameter in the phi_p formula, and   | 
q | 
 The default is set to be 1, and it could be either 1 or 2. If   | 
stage2 | 
 A logic input argument, and it could be either FALSE or TRUE. If   | 
maxtime | 
 A positive number, which indicates the expected maximum CPU time given by user, and it is measured by minutes. For example, maxtime=3.5 indicates the CPU time will be no greater than three and half minutes. The default is set to be 5.  | 
Value
If all inputs are logical, then the output will be a n by k LHD. As mentioned from the original paper, the first stage plays a much more important role since it optimizes the slice level. More resources should be given to the first stage if computational budgets are limited. Let m=n/t, where m is the number of rows for each slice, if (m)^k >> n, the second stage becomes optional. That is the reason why we add a stage2 parameter to let users decide if the second stage is needed.
References
Ba, S., Myers, W.R., and Brenneman, W.A. (2015) Optimal Sliced Latin Hypercube Designs. Technometrics, 57, 479-487.
Examples
#generate a 5 by 3 maximin distance LHD with the default setting
try=SLHD(n=5,k=3)
try
phi_p(try)   #calculate the phi_p of "try".
#generate a 5 by 3 maximin distance LHD with stage II
#let stage2=TRUE and other input are the same as above
try2=SLHD(n=5,k=3,stage2=TRUE)
try2
phi_p(try2)   #calculate the phi_p of "try2".
#Another example
#generate a 8 by 4 nearly orthogonal LHD
try3=SLHD(n=8,k=4,OC="AvgAbsCor",stage2=TRUE)
try3
AvgAbsCor(try3)  #calculate the average absolute correlation.