| Title: | Designs for Computer Experimentations |
|---|---|
| Description: | In computer experiments space-filling designs are having great impact. Most popularly used space-filling designs are Uniform designs (UDs), Latin hypercube designs (LHDs) etc. For further references one can see Mckay (1979) <DOI:10.1080/00401706.1979.10489755> and Fang (1980) <https://cir.nii.ac.jp/crid/1570291225616774784>. In this package, we have provided algorithms for generate efficient LHDs and UDs. Here, generated LHDs are efficient as they possess lower value of Maxpro measure, Phi_p value and Maximum Absolute Correlation (MAC) value based on the weightage given to each criterion. On the other hand, the produced UDs are having good space-filling property as they always attain the lower bound of Discrete Discrepancy measure. Further, some useful functions added in this package for adding more value to this package. |
| Authors: | Ashutosh Dalal [aut, cre], Cini Varghese [aut, ctb], Rajender Parsad [aut, ctb], Mohd Harun [aut, ctb] |
| Maintainer: | Ashutosh Dalal <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0.9 |
| Built: | 2026-05-21 07:50:54 UTC |
| Source: | https://github.com/cran/CompExpDes |
This function will try to find out a significant model for each combinations based on adjusted R^2. Then user need to select which model they want to use.
Best_Model(model, data)Best_Model(model, data)
model |
Provide a vector that contains all the individual terms present in a full model |
data |
Provide data in a matrix or data frame format where you want to fit the model |
Generate a list of significant models for various combinations of factors.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
## Not run: library(CompExpDes) # Sample data data <- data.frame( x1 = c(1.0, 1.4, 1.8, 2.2, 2.6, 3.0, 3.4, 3.8, 4.2, 4.6, 5.0, 5.4), x2 = c(50, 25, 5, 30, 55, 45, 20, 10, 35, 60, 40, 15), x3 = c(2.5, 6.0, 4.0, 1.0, 5.5, 4.5, 3.0, 2.0, 6.5, 3.5, 1.5, 5.0), x4 = c(45, 25, 55, 35, 65, 15, 70, 20, 50, 30, 60, 40), y = c(0.0795, 0.0118, 0.0109, 0.0991, 0.1266, 0.0717, 0.1319, 0.0900, 0.1739, 0.1176, 0.1836, 0.1424) ) # List of terms in the polynomial model model <- list('x1', 'x2', 'x3', 'x4', 'x1:x2', 'x1:x3', 'x1:x4', 'x2:x3', 'x2:x4', 'x3:x4', 'I(x1^2)', 'I(x2^2)', 'I(x3^2)', 'I(x4^2)') Best_Model(model,data) ## End(Not run)## Not run: library(CompExpDes) # Sample data data <- data.frame( x1 = c(1.0, 1.4, 1.8, 2.2, 2.6, 3.0, 3.4, 3.8, 4.2, 4.6, 5.0, 5.4), x2 = c(50, 25, 5, 30, 55, 45, 20, 10, 35, 60, 40, 15), x3 = c(2.5, 6.0, 4.0, 1.0, 5.5, 4.5, 3.0, 2.0, 6.5, 3.5, 1.5, 5.0), x4 = c(45, 25, 55, 35, 65, 15, 70, 20, 50, 30, 60, 40), y = c(0.0795, 0.0118, 0.0109, 0.0991, 0.1266, 0.0717, 0.1319, 0.0900, 0.1739, 0.1176, 0.1836, 0.1424) ) # List of terms in the polynomial model model <- list('x1', 'x2', 'x3', 'x4', 'x1:x2', 'x1:x3', 'x1:x4', 'x2:x3', 'x2:x4', 'x3:x4', 'I(x1^2)', 'I(x2^2)', 'I(x3^2)', 'I(x4^2)') Best_Model(model,data) ## End(Not run)
Discrete Discrepancy is a measure of uniformity for any uniform design. Lesser the value of Discrete Discrepancy measure, better is the uniform design.
Discrete_Discrepancy(Design,a,b)Discrete_Discrepancy(Design,a,b)
Design |
A matrix |
a |
Any value a>b>0. By default it is set to 1. |
b |
Any value a>b>0. By default it is set to 0.5. |
The function calculates the value of Discrete Discrepancy measure and its lower bound for a given design.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Qin H, Fang KT (2004)<DOI:10.1007/s001840300296> Discrete discrepancy in factorial designs. Metrika, 60, 59-72.
library(CompExpDes) lhd1<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) lhd2<-cbind(lhd1[,3],lhd1[,2],lhd1[,1]) ud<-rbind(lhd1,lhd2) Discrete_Discrepancy(ud, 1, 0.5)library(CompExpDes) lhd1<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) lhd2<-cbind(lhd1[,3],lhd1[,2],lhd1[,1]) ud<-rbind(lhd1,lhd2) Discrete_Discrepancy(ud, 1, 0.5)
Maximum Absolute Correlation (MAC) is the maximum absolute value among off diagonal values of a correlation matrix.
MAC(matrix)MAC(matrix)
matrix |
Input a matrix |
It returns a maximum absolute correlation value for a given matrix.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Jones, B. and Nachtsheim, C. J. (2011). A class of three-level designs for definitive screening in the presence of second-order effects. Journal of Quality Technology, 43(1), 1-15.
library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) MAC(lhd)library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) MAC(lhd)
Finding out Maximum coincidence (or Meeting) number between unique pair of rows.
max_coincidence_number(matrix)max_coincidence_number(matrix)
matrix |
Provide any matrix |
This function provides the maximum coincidence number between any pair of rows of for a given matrix.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
library(CompExpDes) mat<-matrix(c(1,2,3,3,2,1,4,2,1),nrow=3,byrow=TRUE) max_coincidence_number(mat)library(CompExpDes) mat<-matrix(c(1,2,3,3,2,1,4,2,1),nrow=3,byrow=TRUE) max_coincidence_number(mat)
This function calculates Maxpro criterion for a given space-filling design. Lesser the value of it better the design, in the sense that the design has maximum spread in higher dimensional spaces.
Maxpro_Measure(Design)Maxpro_Measure(Design)
Design |
Provide a design in a matrix format |
Provides Maxpro criterion value given by Joseph et al. (2015).
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Joseph, V.R., Gul, E. and Ba, S. (2015). Maximum projection designs for computer experiments. Biometrika, 102 (2), 371-380.
library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) Maxpro_Measure(lhd)library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) Maxpro_Measure(lhd)
This NOLHDs are generated using a new algorithm for a flexible parameter range which possesses a good space-filling property.
NOLHDs(factors,levels)NOLHDs(factors,levels)
factors |
Number of factors(>=2) |
levels |
Number of levels(>=factors+3) |
Generates NOLHDs along with its parameters and maximum absolute correlation (MAC) value.
Ashutosh Dalal, Cini varghese, Rajender Parsad and Mohd Harun
Cioppa, T.M. and Lucas, T.W.: Efficient nearly orthogonal and space-filling latin hypercubes. Technometrics, 49(1), 45–55 (2007).
library(CompExpDes) NOLHDs(2,5)library(CompExpDes) NOLHDs(2,5)
This OLHDs are generated using a new unique algorithm which possesses a good space-filling property.
OLHDs_2F(levels)OLHDs_2F(levels)
levels |
Number of levels, 4t-1, where t =3,4,... |
Generates two factor OLHDs along with its parameters.
Ashutosh Dalal, Cini varghese, Rajender Parsad and Mohd Harun
Ye, K.Q.: Orthogonal column Latin hypercubes and their application in computer experiments. Journal of the American Statistical Association, 93(444), 1430–1439 (1998).
library(CompExpDes) OLHDs_2F(11)library(CompExpDes) OLHDs_2F(11)
For a given design Phi_p criterion (Morris and Mitchell, 1995) is calculated using this function. Lesser the value of Phi_p criterion better the design in terms of space-filling.
PhipMeasure(design,p=15,q=1)PhipMeasure(design,p=15,q=1)
design |
A design matrix is needed |
p |
Any positive integer. Default value of p = 15. |
q |
Any positive integer. Default value of q = 1. This implies that we are considering here Euclidean distance. |
Generates Phi_p criterion value
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Morris, M.D. and Mitchell, T.J. (1995). Exploratory designs for computer experiments. Journal of Statistical Planning and Inference, 43, 38-402.
library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) PhipMeasure(lhd,p=15,q=2)library(CompExpDes) lhd<-matrix(c(1,5,7,3,4,2,6,2,1,4,5,3,7,6,4,5,6,1,2,3,7),nrow=7,ncol=3,byrow=FALSE) PhipMeasure(lhd,p=15,q=2)
This sliced LHDs are generated using a different new algorithm for a flexible parameter range which possesses a good space-filling property as whole design as well as for the slices.
SLHDs(slices,factors,levels)SLHDs(slices,factors,levels)
slices |
Number of slices(>=2) |
factors |
Number of factors(>=2) |
levels |
Number of levels(>=3) |
Generates a Sliced LHD along with its parameters.
Ashutosh Dalal, Cini varghese, Rajender Parsad and Mohd Harun
Qian, P.Z.G. and Wu, C.F.J. (2009). Sliced space-filling designs. Biometrika, 96(4), 945–956.
library(CompExpDes) SLHDs(3,3,3)library(CompExpDes) SLHDs(3,3,3)
This series of UDs can be obtained for a composite number of levels, L with always two factors, F. Further, "Excellent" type UDs are Excellent in space-filling with larger number of runs available for L >= 6. On the other hand, "Good" type UDs are good in space-filling and lesser the number of runs, available for L >= 9. Generated designs are UDs under discrete discrepancy measure, as all designs will attain the lower bound value of discrete discrepancy.
UDesigns_I(levels, type)UDesigns_I(levels, type)
levels |
Any composite number >=6 (if "Excellent") or >=9 (if "Good") |
type |
"Excellent" or "Good" |
Type "Excellent" or type "Good" both can exist for a same parameter range. For type "Excellent" it will require more runs than designs generated by type "Good". But type "Excellent" provides designs which are having more spread than type "Good" series designs.
Returns a uniform designs along with number of factors, levels, runs, maximum absolute correlation (MAC) value and discrete discrepancy measure along with its lower bound value.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Fang, K.T. (1980). The uniform design: application of number-theoretic methods in experimental design. Acta Math Appl Sin, 3, 363-372.
library(CompExpDes) UDesigns_I(levels=6, type="Excellent")library(CompExpDes) UDesigns_I(levels=6, type="Excellent")
In this series, the Uniform Designs (UDs) are high dimensional with lesser number of runs will always attain lower bound of discrete discrepancy. They are available for any even number of factors, F (>= 4) with F(F+1) levels each.
UDesigns_II(factors)UDesigns_II(factors)
factors |
any even number >=4 |
Returns a series of high dimensional UDs along with number of factors, levels, runs, MAC value and discrete discrepancy measure along with its lower bound value.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
Fang, K.T. (1980). The uniform design: application of number-theoretic methods in experimental design. Acta Math Appl Sin, 3, 363-372.
library(CompExpDes) UDesigns_II(4)library(CompExpDes) UDesigns_II(4)
This function will provide nearly orthogonal uniform designs (UDs) for number of factors, F = 2 and 4 but a flexible number of levels, L >=3.
UDesigns_III(levels,factors)UDesigns_III(levels,factors)
levels |
Number of levels, L >=3 |
factors |
Number of factors 2 or 4 |
This function will generate 3 Uniform Designs along with the number of levels,factors, runs, MAC value and discrete discrepancy value along with its lower bound value.
Ashutosh Dalal, Cini varghese, Rajender Parsad and Mohd Harun
Fang, K.T. (1980). The uniform design: application of number-theoretic methods in experimental design. Acta Math Appl Sin, 3, 363-372.
## Not run: library(CompExpDes) UDesigns_III(3) ## End(Not run)## Not run: library(CompExpDes) UDesigns_III(3) ## End(Not run)
Weighted Criteria-Based Latin Hypercube Designs (LHDs) for Any Numbers of Factors (>=2)
wtLHDs( levels, factors, w1, w2, w3, pop_size = 30, generations = 100, mut_prob = 1/(factors - 1) )wtLHDs( levels, factors, w1, w2, w3, pop_size = 30, generations = 100, mut_prob = 1/(factors - 1) )
levels |
Range of levels,L is F<=L<=choose(F+2,2), where, F is number of factors. |
factors |
Any number of factors, F >=2. |
w1 |
Weight of maximum absolute correlation. Between 0 to 1. So that w1+w2+w3=1. |
w2 |
Weight of Phi_p criterion. Between 0 to 1. So that w1+w2+w3=1. |
w3 |
Weight of Maxpro criterion. Between 0 to 1. So that w1+w2+w3=1. |
pop_size |
Default population size is 30. |
generations |
Default number of generations is 100. |
mut_prob |
Mutation probability, by default it is 1/(F-1). |
Generates Latin hypercube designs for a given number of factor-level combinations.
## Not run: library(CompExpDes) wtLHDs(9,3,0.5,0.5,0) ## End(Not run)## Not run: library(CompExpDes) wtLHDs(9,3,0.5,0.5,0) ## End(Not run)
Weighted Criteria-Based Latin Hypercube Designs (LHDs) for Prime Numbers
wtLHDs_prime( levels, factors, w1, w2, w3, pop_size = 30, generations = 100, mut_prob = 1/(factors - 1) )wtLHDs_prime( levels, factors, w1, w2, w3, pop_size = 30, generations = 100, mut_prob = 1/(factors - 1) )
levels |
Range of levels,L is F<=L<=F^2, where, F is number of factors. |
factors |
Any number of prime factors, F >=3. |
w1 |
Weight of maximum absolute correlation. Between 0 to 1. So that w1+w2+w3=1. |
w2 |
Weight of Phi_p criterion. Between 0 to 1. So that w1+w2+w3=1. |
w3 |
Weight of Maxpro criterion. Between 0 to 1. So that w1+w2+w3=1. |
pop_size |
Default population size is 30. |
generations |
Default number of generations is 100. |
mut_prob |
Mutation probability, by default it is 1/(F-1). |
Generates Latin hypercube designs for a given number of factor-level combinations.
## Not run: library(CompExpDes) wtLHDs_prime(9,3,1,0,0) ## End(Not run)## Not run: library(CompExpDes) wtLHDs_prime(9,3,1,0,0) ## End(Not run)