Title: | 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, see Deldossi and Nai Ruscone (2020) <doi:10.18637/jss.v094.i02>. |
Authors: | 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 <[email protected]> |
License: | GPL (>= 2) |
Version: | 12.0 |
Built: | 2024-12-19 06:42:41 UTC |
Source: | CRAN |
Implements the objective Bayesian methodology proposed in Consonni and Deldossi in order to choose the optimal experiment that better discriminate between competing models.
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: Laura Deldossi and Marta Nai Ruscone based on Daniel Meyer's code.\ Maintainer: Marta Nai Ruscone <[email protected]>
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.
data(BM86.data)
data(BM86.data)
Design factors and responses used in the examples of Box and Meyer (1986)
data(BM86.data)
data(BM86.data)
A data frame with 16 observations on the following 19 variables.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Log drill advance response.
numeric vector. Tensile strength response.
numeric vector. Shrinkage response.
numeric vector. Yield of isatin response.
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.
library(OBsMD) data(BM86.data,package="OBsMD") print(BM86.data)
library(OBsMD) data(BM86.data,package="OBsMD") print(BM86.data)
12-run Plackett-Burman design from the $2^5$ reactor example from Box, Hunter and Hunter (1977).
data(BM93.e1.data)
data(BM93.e1.data)
A data frame with 12 observations on the following 7 variables.
a numeric vector. Run number from a $2^5$ factorial design in standard order.
a numeric vector. Feed rate factor.
a numeric vector. Catalyst factor.
a numeric vector. Agitation factor.
a numeric vector. Temperature factor.
a numeric vector. Concentration factor.
a numeric vector. Percent reacted response.
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.
library(OBsMD) data(BM93.e1.data,package="OBsMD") print(BM93.e1.data)
library(OBsMD) data(BM93.e1.data,package="OBsMD") print(BM93.e1.data)
12-run Plackett-Burman design for the study of fatigue life of weld repaired castings.
data(BM93.e2.data)
data(BM93.e2.data)
A data frame with 12 observations on the following 8 variables.
a numeric vector. Initial structure factor.
a numeric vector. Bead size factor.
a numeric vector. Pressure treat factor.
a numeric vector. Heat treat factor.
a numeric vector. Cooling rate factor.
a numeric vector. Polish factor.
a numeric vector. Final treat factor.
a numeric vector. Natural log of fatigue life response.
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.
library(OBsMD) data(BM93.e2.data,package="OBsMD") print(BM93.e2.data)
library(OBsMD) data(BM93.e2.data,package="OBsMD") print(BM93.e2.data)
Fractional factorial design in the injection molding example from
Box, Hunter and Hunter (1978).
data(BM93.e3.data)
data(BM93.e3.data)
A data frame with 20 observations on the following 10 variables.
a numeric vector
a numeric vector. Mold temperature factor.
a numeric vector. Moisture content factor.
a numeric vector. Holding Pressure factor.
a numeric vector. Cavity thickness factor.
a numeric vector. Booster pressure factor.
a numeric vector. Cycle time factor.
a numeric vector. Gate size factor.
a numeric vector. Screw speed factor.
a numeric vector. Shrinkage response.
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.
library(OBsMD) data(BM93.e3.data,package="OBsMD") print(BM93.e3.data)
library(OBsMD) data(BM93.e3.data,package="OBsMD") print(BM93.e3.data)
combinations
enumerates the possible combinations of a
specified size from the elements of a vector.
combinations(n, r, v=1:n, set=TRUE, repeats.allowed=FALSE)
combinations(n, r, v=1:n, set=TRUE, repeats.allowed=FALSE)
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
|
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.
Returns a matrix where each row contains a vector of length r
.
Original versions by Bill Venables
[email protected]. Extended to handle
repeats.allowed
by Gregory R. Warnes
[email protected].
Venables, Bill. "Programmers Note", R-News, Vol 1/1, Jan. 2001. https://cran.r-project.org/doc/Rnews/
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
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
Design factors and responses used in the examples of Edwards, Weese and Palmer (2014)
data(MetalCutting)
data(MetalCutting)
A data frame with 64 observations on the following 8 variables.
block
numeric vector. Tool speed.
numeric vector. Workpiece speed.
numeric vector. Depth of cut.
numeric vector. Coolant.
numeric vector. Direction of cut.
numeric vector. Number of cut.
numeric vector. Response.
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
library(OBsMD) data(MetalCutting,package="OBsMD") print(MetalCutting)
library(OBsMD) data(MetalCutting,package="OBsMD") print(MetalCutting)
Data of the Reactor Experiment from Box, Hunter and Hunter (1978).
data(OBsMD.es5)
data(OBsMD.es5)
A data frame with 8 observations on the following 6 variables.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Contrast factor.
numeric vector. Response.
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.
library(OBsMD) data(OBsMD.es5,package="OBsMD") print(OBsMD.es5)
library(OBsMD) data(OBsMD.es5,package="OBsMD") print(OBsMD.es5)
Objective model posterior probabilities and marginal factor posterior probabilities from Bayesian screening experiments according to Consonni and Deldossi procedure.
OBsProb(X, y, abeta=1, bbeta=1, blk, mFac, mInt, nTop)
OBsProb(X, y, abeta=1, bbeta=1, blk, mFac, mInt, nTop)
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. |
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.
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. |
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.
Laura Deldossi. Adapted for R by Marta Nai Ruscone.
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.
print.OBsProb
, plot.OBsProb
, summary.OBsProb
.
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)
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)
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
OMD(OBsProb, nFac, nBlk = 0, nMod, nFoll, Xcand, mIter, nStart, startDes, top = 20)
OMD(OBsProb, nFac, nBlk = 0, nMod, nFoll, Xcand, mIter, nStart, startDes, top = 20)
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. |
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.
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. |
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.
Laura Deldossi. Adapted for R by Marta Nai Ruscone.
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.
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)
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.
data(PB12Des)
data(PB12Des)
A data frame with 12 observations on the following 11 variables.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
numeric vectors. Contrast factor.
Box G. E. P., Hunter, W. C. and Hunter, J. S. (2004) Statistics for Experimenters II. Wiley.
library(OBsMD) data(PB12Des,package="OBsMD") str(PB12Des) X <- as.matrix(PB12Des) print(t(X)%*%X)
library(OBsMD) data(PB12Des,package="OBsMD") str(PB12Des) X <- as.matrix(PB12Des) print(t(X)%*%X)
Method Function for plotting marginal factor posterior probabilities from Objective Bayesian Design.
## S3 method for class 'OBsProb' plot(x, code = TRUE, prt = FALSE, cex.axis=par("cex.axis"), ...)
## S3 method for class 'OBsProb' plot(x, code = TRUE, prt = FALSE, cex.axis=par("cex.axis"), ...)
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 |
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.
The function is called for its side effects. It returns an invisible
NULL
.
Marta Nai Ruscone.
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.
OBsProb
, print.OBsProb
, summary.OBsProb
.
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)
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 method for lists of class OBsProb
. It prints the posterior
probabilities of factors and models from the Objective Bayesian procedure.
## 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,...)
## 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,...)
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 |
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. |
Marta Nai Ruscone.
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.
OBsProb
, summary.OBsProb
, plot.OBsProb
.
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)
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 method for lists of class OMD
. It displays the
best extra-runs according to the OMD criterion together with the correspondent OMD values.
## S3 method for class 'OMD' print(x, X = FALSE, resp = FALSE, Xcand = TRUE, models = TRUE, nMod = x$nMod, digits = 3, verbose=FALSE, ...)
## S3 method for class 'OMD' print(x, X = FALSE, resp = FALSE, Xcand = TRUE, models = TRUE, nMod = x$nMod, digits = 3, verbose=FALSE, ...)
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 |
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. |
Marta Nai Ruscone.
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.
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)
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)
Data of the Reactor Experiment from Box, Hunter and Hunter (1978).
data(Reactor.data)
data(Reactor.data)
A data frame with 32 observations on the following 6 variables.
numeric vector. Feed rate factor.
numeric vector. Catalyst factor.
numeric vector. Agitation rate factor.
numeric vector. Temperature factor.
numeric vector. Concentration factor.
numeric vector. Percentage reacted response.
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.
library(OBsMD) data(Reactor.data,package="OBsMD") print(Reactor.data)
library(OBsMD) data(Reactor.data,package="OBsMD") print(Reactor.data)
Reduced printing method for class OBsProb
lists. Prints
posterior probabilities of factors and models from Objective Bayesian procedure.
## S3 method for class 'OBsProb' summary(object, nTop = 10, digits = 3, ...)
## S3 method for class 'OBsProb' summary(object, nTop = 10, digits = 3, ...)
object |
list. |
nTop |
integer. Number of the top ranked models to print. |
digits |
integer. Significant digits to use. |
... |
additional arguments passed to |
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. |
Marta Nai Ruscone.
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.
OBsProb
, print.OBsProb
, plot.OBsProb
.
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)
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)
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.
## S3 method for class 'OMD' summary(object, digits = 3, verbose=FALSE, ...)
## S3 method for class 'OMD' summary(object, digits = 3, verbose=FALSE, ...)
object |
list of |
digits |
integer. Significant digits to use in the print out. |
verbose |
logical. If |
... |
additional arguments passed to |
It prints out the marginal factors and models posterior probabilities and the top OMD follow-up experiments with their corresponding OMD statistic.
Marta Nai Ruscone.
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.
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)
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)