Title: | Computer Experiment Designs |
---|---|
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.6 |
Built: | 2025-01-27 05:40:24 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)
For prime number of factors, F (>2), this method will generate LHDs with levels, L ranges from F+2 to F^2. Maxpro criterion measure, Phi_p measure also provided as a measure of space-filling and also as an orthogonality measure maximum absolute correlation (MAC) value also provided.
LHDs_I(levels,factors,weight,iterations)
LHDs_I(levels,factors,weight,iterations)
levels |
L,ranges from (F+2) to F^2 |
factors |
A prime number, F (>2) |
weight |
Weight should be given to Maxpro, Phi_p and MAC such that sum is 1. Default it is 0.3, 0.3 and 0.4 |
iterations |
Number of iterations. By default it is 400. |
This function will provide a series of LHDs along with space-filling and orthogonality measures for the generated LHDs.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
McKay, M.D., Beckman, R.J. and Conover, W.J. (1979). Comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics, 21(2), 239-245.
## Not run: library(CompExpDes) LHDs_I(9,3,c(0.6,0,0.4)) ## End(Not run)
## Not run: library(CompExpDes) LHDs_I(9,3,c(0.6,0,0.4)) ## End(Not run)
For any even number of factors, F (>=4), this method will generate LHDs with levels, L ranges from F+2 to sC2, where s=2*F+1. Maxpro criterion measure, Phi_p measure also provided as a measure of space-filling and as an orthogonality measure, maximum absolute correlation (MAC) value also provided.
LHDs_II(levels,factors,weight,iterations)
LHDs_II(levels,factors,weight,iterations)
levels |
Ranges from (F+2) to sC2, where s=2*F+1 |
factors |
F, any even number (>=4) |
weight |
Weight should be given to Maxpro, Phi_p and MAC such that sum is 1. Default it is 0.3, 0.3 and 0.4 |
iterations |
Number of iterations. By default it is 400. |
This function will provide a series of LHDs along with space-filling and orthogonality measures for the generated LHDs.
Ashutosh Dalal, Cini Varghese, Rajender Parsad and Mohd Harun
McKay, M.D., Beckman, R.J. and Conover, W.J. (1979). Comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics, 21(2), 239-245.
## Not run: library(CompExpDes) LHDs_II(20,3,c(0.4,0.2,0.4)) ## End(Not run)
## Not run: library(CompExpDes) LHDs_II(20,3,c(0.4,0.2,0.4)) ## End(Not run)
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)
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)
Finding out Maximum coincidence (or Meeting) number between unique pair of rows.
Meeting_Number(matrix)
Meeting_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) Meeting_Number(mat)
library(CompExpDes) mat<-matrix(c(1,2,3,3,2,1,4,2,1),nrow=3,byrow=TRUE) Meeting_Number(mat)
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=2)
PhipMeasure(design,p=15,q=2)
design |
A design matrix is needed |
p |
Any positive integer. Default value of p = 15. |
q |
Any positive integer. Default value of q = 2. 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)