ccd.augment: Function for augmenting an existing cube with a star portion,...

View source: R/ccd.augment.R

ccd.augmentR Documentation

Function for augmenting an existing cube with a star portion, using package rsm

Description

Function for augmenting an existing fractional factorial with a star portion in case of a late decision for a sequential procedure.

Usage

ccd.augment(cube, ncenter = 4, columns="all", block.name="Block.ccd",
        alpha = "orthogonal", randomize=TRUE, seed=NULL, ...)

Arguments

cube

design generated by function FrF2. The design must not be a split-plot design, nor a parameter design in long version.

ncenter

integer number of center points, or vector with two numbers, the first for the cube and the second for the star portion of the design.
If only one number is given, this is either used for each block (if the cube block does not have center points yet) or for the star portion of the design only.

block.name

name of block factor that distinguishes (at least) between blocks; even for unblocked cubes, the ccd design has a cube and a star point block

alpha

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

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

columns

not yet implemented; it is intended to later allow to add star points for only some factors of a design (after eliminating the others as unimportant in a sequential process), and columns will be used to indicate those

Details

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

Function ccd.augment augments an existing 2-level fractional factorial that should already have been run with center points and should have resolution V.

In exceptional situations, it may be useful to base a ccd on a resolution IV design that allows estimation of all 2-factor interactions of interest. Thus, it can be interesting to apply function ccd.augment to a cube based on the estimable functionality of function FrF2 in cases where a resolution V cube is not feasible. Of course, this does not allow to estimate the aliased 2-factor interactions and therefore generates a warning.

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 original data frame returned by package rsm. 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 based on estimability requirements (cf. also the details section) are not in conventional order and should not be used as the basis for any calculations. The same is true for blocked designs, if the blocking routine blockpick.big was used.

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.

Note

This package is still under (slow) development. Reports about bugs and inconveniences are welcome. ccd.augment is based on version 1 of package rsm.

Author(s)

Ulrike Groemping

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.design, FrF2, lhs-package, rsm

Examples

  ## purely technical examples for the sequential design creation process
    ## start with a fractional factorial with center points
    plan <- FrF2(16,5,default.levels=c(10,30),ncenter=6)
    ## collect data and add them to the design
    y <- rexp(22)
    plan <- add.response(plan,y)
    ## assuming that an analysis has created the suspicion that a second order 
    ## model should be fitted (not to be expected for the above random numbers):
    plan.augmented <- ccd.augment(plan, ncenter=4)
    ## add new responses to the design
    y <- c(y, rexp(14))  ## append responses for the 14=5*2 + 4 star points
    r.plan.augmented <- add.response(plan.augmented, y, replace=TRUE)

  ## for info: how to analyse results from such a desgin
    lm.result <- lm(y~Block.ccd+(.-Block.ccd)^2+I(A^2)+I(B^2)+I(C^2)+I(D^2)+I(E^2), 
                      r.plan.augmented)
    summary(lm.result)
    ## analysis with function rsm
    rsm.result <- rsm(y~Block.ccd+SO(A,B,C,D,E), r.plan.augmented)
    summary(rsm.result)  ## provides more information than lm.result
    loftest(rsm.result)  ## separate lack of fit test
    ## graphical analysis 
    ## (NOTE: purely for demo purposes, the model is meaningless here)
    ## individual contour plot
    contour(rsm.result,B~A)
    ## several contour plots
    par(mfrow=c(1,2))
    contour(rsm.result,list(B~A, C~E))
    ## many contourplots, all pairs of some factors
    par(mfrow=c(2,3))
    contour(rsm.result,~A+B+C+D)

DoE.wrapper documentation built on Aug. 21, 2023, 5:10 p.m.