GLP returns a n by k design matrix generated by good lattice point (GLP)
Usage
GLP(n, k, h = sample(seq(from = 1, to = (n - 1)), k))
Value
If all inputs are logical, then the output will be a n by k GLP design matrix.
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.
References
Korobov, A.N. (1959) The approximate computation of multiple integrals. Dokl. Akad. Nauk SSSR, 124, 1207-1210.
#generate a 5 by 3 GLP design with the default settingtry=GLP(n=5,k=3)
try
#Another example#generate a 8 by 4 GLP design with given h vectortry2=GLP(n=8,k=4,h=c(1,3,5,7))
try2