Function for accessing central composite designs from package rsm, with automatic creation of an appropriate cube portion
ccd.design(nfactors=NULL, factor.names=NULL, default.levels=c(-1,1), ncube=NULL, resolution=if (identical(blocks,1) & is.null(ncube)) 5 else NULL, generators=NULL, ncenter = 4, alpha = "orthogonal", replications=1, block.name="Block.ccd", blocks=1, randomize=TRUE, seed=NULL, ...)
number of factors
list of cube corner values for each factor;
names are used as variable names;
the names must not be x1, x2, ..., as these are used for the variables
in coded units;
default levels (vector of length 2) for all factors for which no specific levels are given
integer number of cube points (without center points for the cube)
arabic numeral for the requested resolution of the cube portion
of the design; cubes for ccd designs should usually be at least of resolution V.
the default value for resolution is therefore 5, unless
generators in the form allowed in function
integer number of center points for each cube or star point block, or vector with two numbers, the first for the cube and the second for the star portion of the design
“orthogonal”, “rotatable”, or a number that indicates the position of the star points; the number 1 would create a face-centered design.
the number of replications of the design; currently, only proper replications can be generated; these are randomized in blocks within the center point and star blocks. The same number of replications is used for both the cube and the star blocks.
name of block factor that distinguishes between blocks; even for unblocked cubes, the ccd design has at least one cube and one star point block
the same as in function
If the experiment is randomized, randomization happens within blocks.
For the statistical and algorithmic background of blocked designs, see
logical that indicates whether or not randomization should occur
NULL or a vector of two integer seeds for random number generation in randomization
reserved for future usage
The statistical background of central composite designs is briefly described
ccd.design creates a central composite design from scratch.
It proceeds by generating a cube design with function
FrF2 and then
augmenting this cube design using functions
add.center from package
FrF2 for adding center points to the cube and subsequently function
ccd from package rsm for generating the star portion of
There are two main purposes for this function: one is to provide
central composite designs within the same syntax philosophy
used in packages
The other is to automatically identify good (=resolution V) cube portions,
which can be achieved by using the resolution parameter.
In comparison to direct usage of package ccd, the functions make the syntax closer to that of the other packages in the DoE.wrapper suite and allow automatic selection of fractional factorials as cubes.
ccd.design does not allow direct use of the
that is available in function
FrF2. Nevertheless, ccd designs with a cube
based on the
estimable functionality can be generated
by first using function
FrF2 and subsequently applying
ccd.augment. It may for example be interesting to use designs based on
estimability requirements for 2-factor interactions in cases where a resolution V cube
for the ccd is not feasible - of course, this does not allow to estimate the full second order model
and therefore generates a warning.
The function returns a data frame of S3 class
with attributes attached. The data frame itself is in the original data scale.
The data frame
desnum attached as attribute
desnum is the coded design.
design.info is a list of various design properties.
type of that list is the character string
Besides the elements present in all class
there are the elements quantitative (vector with
nfactor TRUE entries),
codings element usable in the coding functions available in the rsm
Note that the row names and the standard order column in the
run.order attribute of ccd designs
are not in conventional order,
if the blocking routine
blockpick.big was used.
In such situations, these should not be used as the basis for any calculations.
Since R version 3.6.0, the behavior of function
sample has changed
(correction of a biased previous behavior that should not be relevant for the randomization of designs).
For reproducing a randomized design that was produced with an earlier R version,
please follow the steps described with the argument
This package is still under (slow) development. Reports about bugs and inconveniences are welcome.
ccd.design is based on version 1 of package rsm.
Box, G.E.P., Hunter, J.S. and Hunter, W.G. (2005, 2nd ed.). Statistics for Experimenters. Wiley, New York.
Box, G.E.P. and Wilson, K.B. (1951). On the Experimental Attainment of Optimum Conditions. J. Royal Statistical Society, B13, 1-45.
NIST/SEMATECH e-Handbook of Statistical Methods, http://www.itl.nist.gov/div898/handbook/pri/section3/pri3361.htm, accessed August 20th, 2009.
Myers, R.H., Montgomery, D.C. and Anderson-Cook, C.M. (2009). Response Surface Methodology. Process and Product Optimization Using Designed Experiments. Wiley, New York.
ccd.design(5) ## per default uses the resolution V design in 16 runs for the cube ccd.design(5, ncube=32) ## uses the full factorial for the cube ccd.design(5, ncenter=6, default.levels=c(-10,10)) ## blocked design (requires ncube to be specified) ccd.design(5, ncube=32, blocks=4) ## there is only one star point block ## for usage of other options, look at the FrF2 documentation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.