GLP: Good Lattice Point Design

Description Usage Arguments Value References Examples

View source: R/GLP.R

Description

GLP returns a n by k design matrix generated by good lattice point (GLP)

Usage

1
GLP(n, k, h = sample(seq(from = 1, to = (n - 1)), k))

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.

Value

If all inputs are logical, then the output will be a n by k GLP design matrix.

References

Korobov, A.N. (1959) The approximate computation of multiple integrals. Dokl. Akad. Nauk SSSR, 124, 1207-1210.

Examples

1
2
3
4
5
6
7
8
#generate a 5 by 3 GLP design with the default setting
try=GLP(n=5,k=3)
try

#Another example
#generate a 8 by 4 GLP design with given h vector
try2=GLP(n=8,k=4,h=c(1,3,5,7))
try2

LHD documentation built on Aug. 1, 2021, 1:06 a.m.