Learn R Programming

LHD (version 1.2.0)

LPWT: Linear Permuted Williams Transformation

Description

LPWT returns a maximin distance LHD matrix generated by linear permuted williams transformation, along with its maximum minimum L_1 distance

Usage

LPWT(n, k, h = sample(seq(from = 1, to = (n - 1)), k), method = "manhattan")

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). k must be smaller than n. In GLP designs, k <= the total number of positive integers that are smaller than and coprime to n.

h

A vector whose length is k, with its elements that are smaller than and coprime to n. The default is set to be a random sample of k elements between 1 and n-1.

method

A distance measure method. The default setting is "manhattan", and it could be one of the following: "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given.

Value

If all inputs are logical, then the output will be a list, which contains a n by k LHD and its maximum minimum L_1 distance. This is the construction method in section 2.1 of the reference, and it is particularly useful when n is prime and k equals n-1.

References

Wang, L., Xiao, Q., and Xu, H. (2018) Optimal maximin $L_1$-distance Latin hypercube designs based on good lattice point designs. The Annals of Statistics, 46(6B), 3741-3766.

Examples

Run this code
# NOT RUN {
#generate a 11 by 10 maximin distance LHD with default setting
try=LPWT(n=11,k=10)
try
phi_p(try[[1]])   #calculate the phi_p of "try".

#Another example
#generate a 13 by 12 maximin distance LHD with given h vector
try2=LPWT(n=13,k=12,h=1:12)
try2
phi_p(try2[[1]])   #calculate the phi_p of "try2".

# }

Run the code above in your browser using DataLab