Change a Design to a Response Surface Design

DESCRIPTION:
Function to convert a fractional factorial design to a response surface design by adding star and center points.

USAGE:
convert.to.rsm(fac.df, factors, numeric.levels,
           n.cp = min(n.factors + 1,4), alpha = nrow(fac.df)^(1/4),
           logx = F, keep.all = TRUE)

REQUIRED ARGUMENTS:
fac.df:
a fac.design frame, or a design with only two level factors.

OPTIONAL ARGUMENTS:
factors:
a vector for subscripting the columns of fac.df. These factors will be used to construct the rsm.design. By default, all two level factors are used.
numeric.levels:
vector of length 2 or a list giving the numerical values for the (ordered) levels of each factor. If vector, values are used for all factors. If this is omitted, default values for the two levels are 1 and 2.
n.cp:
the number of center points to be added to the design.
alpha:
a scale factor for the star points. See rsm.design for details.
logx:
single logical value or vector of logical values indicating whether each factor is evenly spaced on the log scale.
keep.all:
logical value. TRUE if all variables in fac.df are in the returned rsm.design; FALSE if only the variables given by factor.

VALUE:
An rsm.design object derived from fac.df, with additional rows for star and center points. The returned object is a central composite design. The factors of fac.df are converted to rsm.factors, that is, continuous variables with center points and star points added. If keep.all=TRUE the non-factor variables are augmented with NAs.

DETAILS:
This function helps when an initial screening experiment is to be augmented with additional points to allow fitting a quadratic response surface.

SEE ALSO:
as.rsm.factor , fac2num.factor , rsm.design .

EXAMPLES:
bufferr.df <- convert.to.rsm(buffer.df, numeric = c(-1,1),
                             keep = F)
temp1 <- rsm.design(5, names(buffer.df)[1:5], fraction = 1/2)
all.equal(bufferr.df, temp1)
convert.to.rsm(design.digest('ff0308'), numeric =
               list(A = c(-1,1), B = c(10,20), C = c(0,1)))