Learn R Programming

DoE.wrapper (version 0.11)

ccd.design: Function for accessing central composite designs from package rsm

Description

Function for accessing central composite designs from package rsm, with automatic creation of an appropriate cube portion

Usage

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, ...)

Value

The function returns a data frame of S3 class design

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. The attribute design.info is a list of various design properties. The element type of that list is the character string ccd. Besides the elements present in all class design objects, there are the elements quantitative (vector with nfactor TRUE entries), and a codings element usable in the coding functions available in the rsm

package, e.g. coded.data.

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.

Arguments

nfactors

number of factors

factor.names

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;
if the list is not named, the variable names are X1, X2 and so forth; in coded units, -1 corresponds to the smaller, +1 to the larger value.

default.levels

default levels (vector of length 2) for all factors for which no specific levels are given

ncube

integer number of cube points (without center points for the cube)

resolution

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 or blocks are specified, in which case the default is NULL

generators

generators in the form allowed in function FrF2

ncenter

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

alpha

“orthogonal”, “rotatable”, or a number that indicates the position of the star points; the number 1 would create a face-centered design.

replications

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.

block.name

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

blocks

the same as in function FrF2;
is EITHER
the number of blocks into which the experiment is subdivided
OR a character vector of names of independent factors that are used as block constructors
OR a vector or list of generators similar to generators.
In the latter case, the differences to generators are

  • that numbers/letters refer to the factors of the experiment and not to column numbers of the Yates matrix

  • that numbers/letters can refer to *all* nfactors factors rather than the log2(nruns) base factors only,

  • that one single number is always interpreted as the number of blocks rather than a column reference,

  • that individual numbers are allowed in a list (i.e. individual factors specified in the experiment can be used as block factors) and

  • that no negative signs are allowed.

If blocks is a single number, it must be a power of 2. A blocked design can have at most nruns-blocks treatment factors, but should usually have fewer than that.

If the experiment is randomized, randomization happens within blocks.

For the statistical and algorithmic background of blocked designs, see block.
Note that the blocking strategy of package FrF2 was modified with version 2 (2.1) of the package.

randomize

logical that indicates whether or not randomization should occur

seed

NULL or a vector of two integer seeds for random number generation in randomization
In R version 3.6.0 and later, the default behavior of function sample has changed. If you work in a new (i.e., >= 3.6.-0) R version and want to reproduce a randomized design from an earlier R version (before 3.6.0), you have to change the RNGkind setting by
RNGkind(sample.kind="Rounding")
before running function ccd.design.
It is recommended to change the setting back to the new recommended way afterwards:
RNGkind(sample.kind="default")
For an example, see the documentation of the example data set VSGFS.

...

reserved for future usage

Warning

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 seed.

Author

Ulrike Groemping

Details

The statistical background of central composite designs is briefly described under CentralCompositeDesigns.

Function 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 the design.

There are two main purposes for this function: one is to provide central composite designs within the same syntax philosophy used in packages DoE.base-package and FrF2. 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.

Function ccd.design does not allow direct use of the estimable functionality 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 function 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.

References

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.

See Also

See also ccd.augment, add.center, FrF2, lhs-package, rsm

Examples

Run this code
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

Run the code above in your browser using DataLab