MDopt: Best Model Discrimination (MD) Follow-Up Experiments

Description Usage Arguments Value References Examples

View source: R/MDopt.R

Description

Best follow-up experiments based on the MD criterion are suggested to discriminate between competing models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
MDopt(
  X,
  y,
  Xcand,
  nMod,
  p_mod,
  fac_mod,
  nFDes = 4,
  max_int = 3,
  g = 2,
  Iter = 20,
  nStart = 10,
  top = 10
)

Arguments

X

Matrix. Design matrix of the initial experiment.

y

Vector. Response vector of the initial experiment.

Xcand

Matrix. Candidate runs to be chosen for the follow-up design.

nMod

Integer. Number of competing models.

p_mod

Vector. Posterior probabilities of the competing models.

fac_mod

Matrix. Active factors in the competing models.

nFDes

Integer. Number of runs to consider in the follow-up experiment.

max_int

Integer. Maximum order of interactions in the models.

g

Numeric. Variance inflation factor for active effects.

Iter

Integer. Maximum number of iterations for each search.

nStart

Integer. Number of random starting designs.

top

Integer. Highest MD follow-up designs recorded.

Value

A list with all the input and output parameters.

X

Matrix. The design matrix.

y

Vector. The response vector.

Xcand

Matrix. Candidate runs to be chosen for the follow-up design.

Runs

Integer. Number of runs.

Fac

Integer. Number of factors.

nMod

Integer. Number of competing models.

p_mod

Vector. Posterior probabilities of the competing models.

fac_mod

Matrix. Active factors in the competing models.

nFDes

Integer. Number of runs to consider in the follow-up experiment.

max_int

Integer. Maximum order of the interactions in the models.

g

Numeric. Variance inflation factor for active effects.

Iter

Integer. Maximum number of iterations for each search.

nStart

Integer. Number of random starting designs.

top

Integer. Highest MD follow-up designs recorded.

MD

Data frame. Designs points and MD for top designs.

MDtop

Vector. MD for top designs.

DEStop

Data frame. Top design points.

References

Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996). "Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)". Technometrics, Vol. 38, No. 4, pp. 303-332.

Box, G. E. P and R. D. Meyer (1993). "Finding the Active Factors in Fractionated Screening Experiments". Journal of Quality Technology. Vol. 25. No. 2. pp. 94–105.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#Example 1
library(BsMD2)
data(BM93e3)
X <- as.matrix(BM93e3[1:16,c(1,2,4,6,9)]) #matriz de diseño inicial
y <- as.vector(BM93e3[1:16,10]) #vector de respuesta
p_mod <- c(0.2356,0.2356,0.2356,0.2356,0.0566) #probabilidad posterior de los 5 modelos
fac_mod <- matrix(c(2,1,1,1,1,3,3,2,2,2,4,4,3,4,3,0,0,0,0,4),nrow=5,
                  dimnames=list(1:5,c("f1","f2","f3","f4")))
Xcand <- matrix(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
                  -1,-1,-1,-1,1,1,1,1,-1,-1,-1,-1,1,1,1,1,
                  -1,-1,1,1,-1,-1,1,1,-1,-1,1,1,-1,-1,1,1,
                  -1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,
                  -1,1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,1,1,-1),
                nrow=16,dimnames=list(1:16,c("blk","f1","f2","f3","f4"))
)
injectionMolding <- MDopt(X = X, y = y, Xcand = Xcand, nMod = 5, p_mod = p_mod, fac_mod = fac_mod,
nStart = 25)

#Example 2
data(M96e2,package="BsMD2")
X <- as.matrix(cbind(blk = rep(-1,8), M96e2[c(25,2,19,12,13,22,7,32), 1:5]))
y <- M96e2[c(25,2,19,12,13,22,7,32), 6]
pp <- BsProb1(X = X[,2:6], y = y, p = .25, gamma = .4, max_int = 3, max_fac = 5, top = 32)
p <- pp@p_mod
facs <- pp@fac_mod
Xcand <- as.matrix(cbind(blk = rep(+1,32), M96e2[,1:5]))
#e2 <- MDopt(X = X, y = y, Xcand = Xcand, nMod = 32, p_mod = p, fac_mod = facs, g = .4,
#Iter = 10, nStart = 25, top = 5)

ana-vela7/BsMD2 documentation built on Dec. 19, 2021, 2:32 a.m.