Title: | Objective Bayesian Model Discrimination in Follow-Up Designs |
Version: | 12.0 |
Description: | Implements the objective Bayesian methodology proposed in Consonni and Deldossi in order to choose the optimal experiment that better discriminate between competing models, see Deldossi and Nai Ruscone (2020) <doi:10.18637/jss.v094.i02>. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | yes |
Packaged: | 2024-08-19 15:21:05 UTC; martanairuscone |
Author: | Marta Nai Ruscone [aut, cre], Laura Deldossi [aut], Cleve Moler [ctb] (LINPACK routines in src), Jack Dongarra [ctb] (LINPACK routines in src) |
Maintainer: | Marta Nai Ruscone <marta.nairuscone@unige.it> |
Repository: | CRAN |
Date/Publication: | 2024-08-19 18:40:14 UTC |
Objective Bayesian Model Discrimination in Follow-Up Designs
Description
Implements the objective Bayesian methodology proposed in Consonni and Deldossi in order to choose the optimal experiment that better discriminate between competing models.
Details
Package: | OBsMD |
Type: | Package |
Version: | 12.0 |
Date: | 2024-08-19 |
License: | GPL version 3 or later |
The packages allows you to perform the calculations and analyses described in Consonni and Deldossi paper in TEST (2016), Objective Bayesian model discrimination in follow-up experimental designs.
Author(s)
Author: Laura Deldossi and Marta Nai Ruscone based on Daniel Meyer's code.\ Maintainer: Marta Nai Ruscone <marta.nairuscone@unige.it>
References
Deldossi, L., Nai Ruscone, M. (2020) R Package OBsMD for Follow-up Designs in an Objective Bayesian Framework. Journal of Statistical Software 94(2), 1–37. doi:10.18637/jss.v094.i02.
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
Box, G. E. P. and Meyer R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11–18. doi:10.1080/00401706.1986.10488093.
Box, G. E. P. and Meyer R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996) Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)., Technometrics 38(4), 303–332. doi:10.2307/1271297.
Examples
data(BM86.data)
Data sets in Box and Meyer (1986)
Description
Design factors and responses used in the examples of Box and Meyer (1986)
Usage
data(BM86.data)
Format
A data frame with 16 observations on the following 19 variables.
- X1
numeric vector. Contrast factor.
- X2
numeric vector. Contrast factor.
- X3
numeric vector. Contrast factor.
- X4
numeric vector. Contrast factor.
- X5
numeric vector. Contrast factor.
- X6
numeric vector. Contrast factor.
- X7
numeric vector. Contrast factor.
- X8
numeric vector. Contrast factor.
- X9
numeric vector. Contrast factor.
- X10
numeric vector. Contrast factor.
- X11
numeric vector. Contrast factor.
- X12
numeric vector. Contrast factor.
- X13
numeric vector. Contrast factor.
- X14
numeric vector. Contrast factor.
- X15
numeric vector. Contrast factor.
- y1
numeric vector. Log drill advance response.
- y2
numeric vector. Tensile strength response.
- y3
numeric vector. Shrinkage response.
- y4
numeric vector. Yield of isatin response.
References
Box, G. E. P. and Meyer, R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11–18. doi:10.1080/00401706.1986.10488093.
Examples
library(OBsMD)
data(BM86.data,package="OBsMD")
print(BM86.data)
Example 1 data in Box and Meyer (1993)
Description
12-run Plackett-Burman design from the $2^5$ reactor example from Box, Hunter and Hunter (1977).
Usage
data(BM93.e1.data)
Format
A data frame with 12 observations on the following 7 variables.
- Run
a numeric vector. Run number from a $2^5$ factorial design in standard order.
- A
a numeric vector. Feed rate factor.
- B
a numeric vector. Catalyst factor.
- C
a numeric vector. Agitation factor.
- D
a numeric vector. Temperature factor.
- E
a numeric vector. Concentration factor.
- y
a numeric vector. Percent reacted response.
References
Box, G. E. P., Hunter, W. C. and Hunter, J. S. (1978) Statistics for Experimenters. Wiley.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Examples
library(OBsMD)
data(BM93.e1.data,package="OBsMD")
print(BM93.e1.data)
Example 2 data in Box and Meyer (1993)
Description
12-run Plackett-Burman design for the study of fatigue life of weld repaired castings.
Usage
data(BM93.e2.data)
Format
A data frame with 12 observations on the following 8 variables.
- A
a numeric vector. Initial structure factor.
- B
a numeric vector. Bead size factor.
- C
a numeric vector. Pressure treat factor.
- D
a numeric vector. Heat treat factor.
- E
a numeric vector. Cooling rate factor.
- F
a numeric vector. Polish factor.
- G
a numeric vector. Final treat factor.
- y
a numeric vector. Natural log of fatigue life response.
References
Hunter, G. B., Hodi, F. S., and Eager, T. W. (1982) High-Cycle Fatigue of Weld Repaired Cast Ti-6A1-4V., Metallurgical Transactions 13(9), 1589–1594.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Examples
library(OBsMD)
data(BM93.e2.data,package="OBsMD")
print(BM93.e2.data)
Example 3 data in Box and Meyer (1993)
Description
2^{8-4}
Fractional factorial design in the injection molding example from
Box, Hunter and Hunter (1978).
Usage
data(BM93.e3.data)
Format
A data frame with 20 observations on the following 10 variables.
- blk
a numeric vector
- A
a numeric vector. Mold temperature factor.
- B
a numeric vector. Moisture content factor.
- C
a numeric vector. Holding Pressure factor.
- D
a numeric vector. Cavity thickness factor.
- E
a numeric vector. Booster pressure factor.
- F
a numeric vector. Cycle time factor.
- G
a numeric vector. Gate size factor.
- H
a numeric vector. Screw speed factor.
- y
a numeric vector. Shrinkage response.
References
Box G. E. P., Hunter, W. C. and Hunter, J. S. (1978) Statistics for Experimenters. Wiley.
Box G. E. P., Hunter, W. C. and Hunter, J. S. (2004) Statistics for Experimenters II. Wiley.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Examples
library(OBsMD)
data(BM93.e3.data,package="OBsMD")
print(BM93.e3.data)
Data sets in Edwards, Weese and Palmer (2014)
Description
Design factors and responses used in the examples of Edwards, Weese and Palmer (2014)
Usage
data(MetalCutting)
Format
A data frame with 64 observations on the following 8 variables.
- blk
block
- A
numeric vector. Tool speed.
- B
numeric vector. Workpiece speed.
- C
numeric vector. Depth of cut.
- D
numeric vector. Coolant.
- E
numeric vector. Direction of cut.
- F
numeric vector. Number of cut.
- Ytransformed
numeric vector. Response.
References
Edwards, D. J. P., Weese, M. L. and Palmer, G. A. (2014) Comparing methods for design follow-uprevisiting a metal-cutting case study., Applied Stochastic Models in Business and Industry 30(4), 464–478. doi:10.1002/asmb.1988
Examples
library(OBsMD)
data(MetalCutting,package="OBsMD")
print(MetalCutting)
Internal OBsMD objects
Description
Internal OBsMD objects.
Details
These are not to be called by the user.
OBsMD.es5
Description
Data of the Reactor Experiment from Box, Hunter and Hunter (1978).
Usage
data(OBsMD.es5)
Format
A data frame with 8 observations on the following 6 variables.
- A
numeric vector. Contrast factor.
- B
numeric vector. Contrast factor.
- C
numeric vector. Contrast factor.
- D
numeric vector. Contrast factor.
- E
numeric vector. Contrast factor.
- y
numeric vector. Response.
References
Box G. E. P., Hunter, W. C. and Hunter, J. S. (1978) Statistics for Experimenters. Wiley.
Box G. E. P., Hunter, W. C. and Hunter, J. S. (2004) Statistics for Experimenters II. Wiley.
Examples
library(OBsMD)
data(OBsMD.es5,package="OBsMD")
print(OBsMD.es5)
Objective Posterior Probabilities from Bayesian Screening Experiments
Description
Objective model posterior probabilities and marginal factor posterior probabilities from Bayesian screening experiments according to Consonni and Deldossi procedure.
Usage
OBsProb(X, y, abeta=1, bbeta=1, blk, mFac, mInt, nTop)
Arguments
X |
Matrix. The design matrix. |
y |
vector. The response vector. |
abeta |
First parameter of the Beta prior distribution on model space |
bbeta |
Second parameter of the Beta prior distribution on model space |
blk |
integer. Number of blocking factors (>=0). These factors are
accommodated in the first columns of matrix |
mFac |
integer. Maximum number of factors included in the models. |
mInt |
integer <= 3. Maximum order of interactions among factors considered in the models. |
nTop |
integer <=100. Number of models to print ordered according to the highest posterior probability. |
Details
Model and factor posterior probabilities are computed according to Consonni and Deldossi Objective Bayesian
procedure. The design factors are accommodated in the matrix X
after
blk
columns of the blocking factors. So, ncol(X)-blk
design factors
are considered.
A Beta(abeta, bbeta) distribution is assumed as a prior on model space.
The function calls the FORTRAN subroutine ‘obm’ and captures summary results.
The complete output of the FORTRAN code is save in the ‘OBsPrint.out’
file in the working directory. The output is a list of class OBsProb
for which
print
, plot
and summary
methods are available.
Value
Below a list with all output parameters of the FORTRAN subroutine ‘obm’. The names of the list components are such that they match the original FORTRAN code. Small letters are used for capturing program's output.
X |
matrix. The design matrix. |
Y |
vector. The response vector. |
N |
integer. Number of runs of the screening experiment. |
COLS |
integer. Number of design factors. |
abeta |
integer. First parameter of the Beta prior distribution on model space |
bbeta |
integer. Second parameter of the Beta prior distribution on model space |
BLKS |
integer. Number of blocking factors accommodated in the first
columns of matrix |
MXFAC |
integer. Maximum number of factors considered in the models. |
MXINT |
integer. Maximum interaction order among factors considered in the models. |
NTOP |
integer. Number of models to print ordered according to the highest posterior probability. |
mdcnt |
integer. Total number of models evaluated. |
ptop |
vector. Vector of posterior probabilities of the top |
nftop |
integer. Number of factors in each of the top |
jtop |
matrix. Matrix of the factors' labels
of the top |
prob |
vector. Vector of factor posterior probabilities. |
sigtop |
vector. Vector of residual variances of the top |
ind |
integer. Indicator variable. |
Note
The function is a wrapper to call the FORTRAN subroutine ‘obm’, modification of Daniel Meyer's original program, ‘mbcqp5.f’, for the application of Objective Bayesian follow-up design.
Author(s)
Laura Deldossi. Adapted for R by Marta Nai Ruscone.
References
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996) Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)., Technometrics 38(4), 303–332. doi:10.2307/1271297.
See Also
print.OBsProb
, plot.OBsProb
, summary.OBsProb
.
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
# Using for model prior probability a Beta with parameters a=1 b=1
es5.OBsProb <- OBsProb(X=X,y=y, abeta=1, bbeta=1, blk=0,mFac=5,mInt=2,nTop=32)
print(es5.OBsProb)
summary(es5.OBsProb)
Objective Model Discrimination (OMD) in Follow-Up Experiments
Description
Optimal follow-up experiments to discriminate between competing models. The extra-runs are derived from the maximization of the objective model discrimination criterion represented by a weighted average of Kullback-Leibler divergences between all possible pairs of rival models
Usage
OMD(OBsProb, nFac, nBlk = 0, nMod, nFoll, Xcand, mIter, nStart, startDes, top = 20)
Arguments
OBsProb |
list. |
nFac |
integer. Number of factors in the initial experiment. |
nBlk |
integer >=0. Number of blocking factors in the initial experiment.
They are accommodated in the first columns of matrix |
nMod |
integer. Number of competing models considered to compute |
nFoll |
integer. Number of additional runs in the follow-up experiment. |
Xcand |
matrix. Matrix [ |
mIter |
integer >=0. Maximum number of iterations in the exchange algorithm.
If |
nStart |
integer. Number of different designs of dimension |
startDes |
matrix. Input matrix [ |
top |
integer. Number of highest OMD follow-up designs recorded. |
Details
The OMD criterion, proposed by Consonni and Deldossi, is used to discriminate
among competing models. Random starting runs chosen from Xcand
are used
for the Wynn search of best OMD follow-up designs. nStart
starting points are
tried in the search limited to mIter
iterations. If mIter=0
then
startDes
user-provided designs are used. Posterior probabilities and residual
variances of the competing models are obtained from OBsProb
.
The function calls the FORTRAN subroutine ‘omd’ and captures
summary results. The complete output of the FORTRAN code is save in
the ‘MDPrint.out’ file in the working directory.
Value
Below a list with all input and output parameters of the FORTRAN
subroutine OMD
. Most of the variable names kept to match FORTRAN code.
NSTART |
integer. Number of different designs of dimension |
NRUNS |
integer. Number |
ITMAX |
integer. Maximum number |
INITDES |
integer. Indicator variable. If |
N0 |
integer. Numbers of runs |
X |
matrix. Matrix from initial experiment ( |
Y |
double. Response values from initial experiment ( |
BL |
integer >=0. The number of blocking factors in the initial experiment.
They are accommodated in the first columns of matrix |
COLS |
integer. Number of factors |
N |
integer. Number of candidate runs |
Xcand |
matrix. Matrix [ |
NM |
integer. Number of competing models |
P |
double. Models posterior probability |
SIGMA2 |
double. Competing models residual variances |
NF |
integer. Number of main factors in each competing models |
MNF |
integer. Maximum number of factor in models ( |
JFAC |
matrix. Matrix |
CUT |
integer. Maximum order of the interaction among factors in the models |
MBEST |
matrix. If |
NTOP |
integer. Number of the top best OMD designs |
TOPD |
double. The OMD value for the best top |
TOPDES |
matrix. Top |
flag |
integer. Indicator = 1, if the ‘md’ subroutine finished properly, -1 otherwise. |
Note
The function is a wrapper to call the modified FORTAN subroutine ‘omd’, ‘OMD.f’, part of the mdopt bundle for Bayesian model discrimination of multifactor experiments.
Author(s)
Laura Deldossi. Adapted for R by Marta Nai Ruscone.
References
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996) Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)., Technometrics 38(4), 303–332. doi:10.2307/1271297.
See Also
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
es5.OBsProb <- OBsProb(X=X,y=y,blk=0,mFac=5,mInt=2,nTop=32)
nMod <- 26
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,
-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=32,ncol=5,dimnames=list(1:32,c("A","B","C","D","E")),byrow=TRUE)
p_omd <- OMD(OBsProb=es5.OBsProb,nFac=5,nBlk=0,nMod=26,nFoll=4,Xcand=Xcand,
mIter=20,nStart=25,startDes=NULL,top=30)
print(p_omd)
12-run Plackett-Burman Design Matrix
Description
12-run Plackett-Burman design matrix.
Usage
data(PB12Des)
Format
A data frame with 12 observations on the following 11 variables.
- x1
numeric vectors. Contrast factor.
- x2
numeric vectors. Contrast factor.
- x3
numeric vectors. Contrast factor.
- x4
numeric vectors. Contrast factor.
- x5
numeric vectors. Contrast factor.
- x6
numeric vectors. Contrast factor.
- x7
numeric vectors. Contrast factor.
- x8
numeric vectors. Contrast factor.
- x9
numeric vectors. Contrast factor.
- x10
numeric vectors. Contrast factor.
- x11
numeric vectors. Contrast factor.
References
Box G. E. P., Hunter, W. C. and Hunter, J. S. (2004) Statistics for Experimenters II. Wiley.
Examples
library(OBsMD)
data(PB12Des,package="OBsMD")
str(PB12Des)
X <- as.matrix(PB12Des)
print(t(X)%*%X)
Reactor Experiment Data
Description
Data of the Reactor Experiment from Box, Hunter and Hunter (1978).
Usage
data(Reactor.data)
Format
A data frame with 32 observations on the following 6 variables.
- A
numeric vector. Feed rate factor.
- B
numeric vector. Catalyst factor.
- C
numeric vector. Agitation rate factor.
- D
numeric vector. Temperature factor.
- E
numeric vector. Concentration factor.
- y
numeric vector. Percentage reacted response.
References
Box G. E. P., Hunter, W. C. and Hunter, J. S. (1978) Statistics for Experimenters. Wiley.
Box G. E. P., Hunter, W. C. and Hunter, J. S. (2004) Statistics for Experimenters II. Wiley.
Examples
library(OBsMD)
data(Reactor.data,package="OBsMD")
print(Reactor.data)
Enumerate the Combinations of the Elements of a Vector
Description
combinations
enumerates the possible combinations of a
specified size from the elements of a vector.
Usage
combinations(n, r, v=1:n, set=TRUE, repeats.allowed=FALSE)
Arguments
n |
Size of the source vector |
r |
Size of the target vectors |
v |
Source vector. Defaults to |
set |
Logical flag indicating whether duplicates should be
removed from the source vector |
repeats.allowed |
Logical flag indicating whether the
constructed vectors may include duplicated values. Defaults to
|
Details
Caution: The number of combinations increases rapidly
with n
and r
!.
To use values of n
above about 45, you will need to increase
R's recursion limit. See the expression
argument to the
options
command for details on how to do this.
Value
Returns a matrix where each row contains a vector of length r
.
Author(s)
Original versions by Bill Venables
Bill.Venables@cmis.csiro.au. Extended to handle
repeats.allowed
by Gregory R. Warnes
greg@warnes.net.
References
Venables, Bill. "Programmers Note", R-News, Vol 1/1, Jan. 2001. https://cran.r-project.org/doc/Rnews/
Examples
combinations(3,2,letters[1:3])
combinations(3,2,c(1:3),repeats=TRUE)
combinations(6,3,1:6,repeats=TRUE)
# To use large 'n', you need to change the default recusion limit
options(expressions=1e5)
cmat <- combinations(100,2)
dim(cmat) # 4950 by 2
Plotting of Posterior Probabilities from Objective Bayesian Design
Description
Method Function for plotting marginal factor posterior probabilities from Objective Bayesian Design.
Usage
## S3 method for class 'OBsProb'
plot(x, code = TRUE, prt = FALSE, cex.axis=par("cex.axis"), ...)
Arguments
x |
list. List of class |
code |
logical. If |
prt |
logical. If |
cex.axis |
Magnification used for the axis annotation.
See |
... |
additional graphical parameters passed to |
Details
A spike plot, similar to barplots, is produced with a spike for each factor.
Marginal posterior probabilities are used for the vertical axis.
If code=TRUE
, X1
, X2
, ... are used to label the factors
otherwise the original factor names are used.
If prt=TRUE
, the print.OBsProb
function is called
and the marginal posterior probabilities are displayed.
Value
The function is called for its side effects. It returns an invisible
NULL
.
Author(s)
Marta Nai Ruscone.
References
Box, G. E. P. and Meyer R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11–18. doi:10.1080/00401706.1986.10488093.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
See Also
OBsProb
, print.OBsProb
, summary.OBsProb
.
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
# Using for model prior probability a Beta with parameters a=1 b=1
es5.OBsProb <- OBsProb(X=X,y=y, abeta=1, bbeta=1, blk=0,mFac=5,mInt=2,nTop=32)
print(es5.OBsProb)
summary(es5.OBsProb)
plot(es5.OBsProb)
Printing Objective Posterior Probabilities from Bayesian Design
Description
Printing method for lists of class OBsProb
. It prints the posterior
probabilities of factors and models from the Objective Bayesian procedure.
Usage
## S3 method for class 'OBsProb'
print(x, X = TRUE, resp = TRUE, factors = TRUE, models = TRUE,
nTop, digits = 3, plt = FALSE, verbose = FALSE, Sh= TRUE, CV=TRUE,...)
Arguments
x |
list. Object of |
X |
logical. If |
resp |
logical. If |
factors |
logical. If |
models |
logical. If |
nTop |
integer. Number of the top ranked models to print. |
digits |
integer. Significant digits to use for printing. |
plt |
logical. If |
verbose |
logical. If |
Sh |
logical. If |
CV |
logical. If |
... |
additional arguments passed to |
Value
The function prints out marginal factors and models posterior probabilities. Returns invisible list with the components:
calc |
numeric vector with general calculation information. |
probabilities |
Data frame with the marginal posterior factor probabilities. |
models |
Data frame with model posterior probabilities. |
Sh |
Normalized Shannon heterogeneity index on the posterior probabilities of models |
CV |
Coefficient of variation of factor posterior probabilities. |
Author(s)
Marta Nai Ruscone.
References
Box, G. E. P. and Meyer R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11–18. doi:10.1080/00401706.1986.10488093.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
See Also
OBsProb
, summary.OBsProb
, plot.OBsProb
.
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
# Using for model prior probability a Beta with parameters a=1 b=1
es5.OBsProb <- OBsProb(X=X,y=y, abeta=1, bbeta=1, blk=0,mFac=5,mInt=2,nTop=32)
print(es5.OBsProb)
summary(es5.OBsProb)
plot(es5.OBsProb)
Print Optimal OMD Follow-Up Experiments
Description
Printing method for lists of class OMD
. It displays the
best extra-runs according to the OMD criterion together with the correspondent OMD values.
Usage
## S3 method for class 'OMD'
print(x, X = FALSE, resp = FALSE, Xcand = TRUE, models = TRUE, nMod = x$nMod,
digits = 3, verbose=FALSE, ...)
Arguments
x |
list of class |
X |
logical. If |
resp |
logical If |
Xcand |
logical. If |
models |
logical. Competing models are printed if |
nMod |
integer. Top models to print. |
digits |
integer. Significant digits to use in the print out. |
verbose |
logical. If |
... |
additional arguments passed to |
Value
The function is mainly called for its side effects. Prints out the selected
components of the class OMD
objects, output of the OMD
function.
For example the marginal factors and models posterior probabilities and
the top OMD follow-up experiments with their corresponding OMD statistic.
It returns invisible list with the components:
calc |
Numeric vector with basic calculation information. |
models |
Data frame with the competing models posterior probabilities. |
follow-up |
Data frame with the runs for follow-up experiments and their corresponding OMD statistic. |
Author(s)
Marta Nai Ruscone.
References
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996) Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)., Technometrics 38(4), 303–332. doi:10.2307/1271297.
See Also
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
es5.OBsProb <- OBsProb(X=X,y=y,blk=0,mFac=5,mInt=2,nTop=32)
nMod <- 26
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,
-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=32,ncol=5,dimnames=list(1:32,c("A","B","C","D","E")),byrow=TRUE)
p_omd <- OMD(OBsProb=es5.OBsProb,nFac=5,nBlk=0,nMod=26,
nFoll=4,Xcand=Xcand,mIter=20,nStart=25,startDes=NULL,
top=30)
print(p_omd)
Summary of Posterior Probabilities from Objective Bayesian Design
Description
Reduced printing method for class OBsProb
lists. Prints
posterior probabilities of factors and models from Objective Bayesian procedure.
Usage
## S3 method for class 'OBsProb'
summary(object, nTop = 10, digits = 3, ...)
Arguments
object |
list. |
nTop |
integer. Number of the top ranked models to print. |
digits |
integer. Significant digits to use. |
... |
additional arguments passed to |
Value
The function prints out the marginal factors and models posterior probabilities. Returns invisible list with the components:
calc |
Numeric vector with basic calculation information. |
probabilities |
Data frame with the marginal posterior probabilities. |
models |
Data frame with the models posterior probabilities. |
Author(s)
Marta Nai Ruscone.
References
Box, G. E. P. and Meyer R. D. (1986) An Analysis of Unreplicated Fractional Factorials., Technometrics 28(1), 11–18. doi:10.1080/00401706.1986.10488093.
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
See Also
OBsProb
, print.OBsProb
, plot.OBsProb
.
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
# Using for model prior probability a Beta with parameters a=1 b=1
es5.OBsProb <- OBsProb(X=X,y=y, abeta=1, bbeta=1, blk=0,mFac=5,mInt=2,nTop=32)
print(es5.OBsProb)
summary(es5.OBsProb)
Summary of Optimal OMD Follow-Up Experiments
Description
Reduced printing method for lists of class OMD
. It displays the
best extra-runs according to the OMD criterion together with the correspondent OMD value.
Usage
## S3 method for class 'OMD'
summary(object, digits = 3, verbose=FALSE, ...)
Arguments
object |
list of |
digits |
integer. Significant digits to use in the print out. |
verbose |
logical. If |
... |
additional arguments passed to |
Value
It prints out the marginal factors and models posterior probabilities and the top OMD follow-up experiments with their corresponding OMD statistic.
Author(s)
Marta Nai Ruscone.
References
Box, G. E. P. and Meyer, R. D. (1993) Finding the Active Factors in Fractionated Screening Experiments., Journal of Quality Technology 25(2), 94–105. doi:10.1080/00224065.1993.11979432.
Consonni, G. and Deldossi, L. (2016) Objective Bayesian Model Discrimination in Follow-up design., Test 25(3), 397–412. doi:10.1007/s11749-015-0461-3.
Meyer, R. D., Steinberg, D. M. and Box, G. E. P. (1996) Follow-Up Designs to Resolve Confounding in Multifactor Experiments (with discussion)., Technometrics 38(4), 303–332. doi:10.2307/1271297.
See Also
Examples
library(OBsMD)
data(OBsMD.es5, package="OBsMD")
X <- as.matrix(OBsMD.es5[,1:5])
y <- OBsMD.es5[,6]
es5.OBsProb <- OBsProb(X=X,y=y,blk=0,mFac=5,mInt=2,nTop=32)
nMod <- 26
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,
-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=32,ncol=5,dimnames=list(1:32,c("A","B","C","D","E")),byrow=TRUE)
p_omd <- OMD(OBsProb=es5.OBsProb,nFac=5,nBlk=0,nMod=26,
nFoll=4,Xcand=Xcand,mIter=20,nStart=25,startDes=NULL,
top=30)
summary(p_omd)