# NOT RUN {
#generate a 5 by 3 maximin distance LHD with the default setting
trySLHD1=SLHD(n=5,k=3)
trySLHD1
phi_p(trySLHD1) #calculate the phi_p of "trySLHD1".
#generate a 5 by 3 maximin distance LHD with stage II
#let stage2=TRUE and other input are the same as above
trySLHD2=SLHD(n=5,k=3,stage2=TRUE)
trySLHD2
phi_p(trySLHD2) #calculate the phi_p of "trySLHD2".
#Another example
#generate a 8 by 4 nearly orthogonal LHD
trySLHD3=SLHD(n=8,k=4,OC="AvgAbsCor",stage2=TRUE)
trySLHD3
AvgAbsCor(trySLHD3) #calculate the average absolute correlation.
# }
Run the code above in your browser using DataLab