LHD (version 0.1.0)

OA2LHD: Transfer an Orthogonal Array (OA) into a LHD

Description

OA2LHD transfers an OA into a LHD with corresponding size

Usage

OA2LHD(OA, n, m, s, r)

Arguments

OA

A Matrix.

n

A positive integer.

m

A positive integer.

s

A positive integer.

r

A positive integer.

Value

If all inputs are logical, then the output will be a n by m LHD.

Details

  • OA stands for the input orthogonal array matrix.

  • n stands for the number of rows of OA.

  • m stands for the number of columns of OA.

  • s stands for the number of levels of OA.

  • r stands for the strength of OA.

References

Tang, B. (1993) Orthogonal-array-based latin hypercubes. Journal of the Americal Statistical Association, 88, 1392-1397.

Examples

Run this code
# NOT RUN {
#create an OA(9,2,3,2)
OA=matrix(c(rep(1:3,each=3),rep(1:3,times=3)),ncol=2,nrow=9,byrow = FALSE);OA

#Transfer the "OA" above into a LHD according to Tang (1993)
tryOA=OA2LHD(OA=OA,9,2,3,2)
OA;tryOA
# }

Run the code above in your browser using DataCamp Workspace