bbd {rsm} | R Documentation |
This function can generate a Box-Behnken design in 3 to 7 factors, and optionally will block it orthogonally if there are 4 or 5 factors. It can also randomize the design and create a coded.data
object.
bbd(k, n0 = 4, block = (k == 4 | k == 5), randomize = TRUE, coding)
k |
A formula, or an integer giving the number of variables. If the formula has a left-hand side, the variables named there are appended to the design and initialized to NA . |
n0 |
Number of center points in each block. |
block |
Boolean specifying whether or not to block the design; or a character string (taken as TRUE ) giving the desired name for the blocking factor.
Only BBDs with 4 or 5 factors can be blocked. A 4-factor BBD has three orthogonal blocks, and a 5-factor BBD has two. |
randomize |
Boolean determining whether or not to randomize the design. If block is TRUE , each block is randomized separately. |
coding |
Optional list of formulas. If this is provided, a coded.data object is returned with the specified coding. |
Box-Behnken designs (BBDs) are useful designs for fitting second-order response-surface models. They use only three levels of each factor (compared with 5 for central-composite designs) and sometimes fewer runs are required than a CCD. This function uses an internal table of BBDs; it only works for 3 to 7 factors.
If k
is specified as a formula, the names in the formula determine the names of the factors in the generated design. Otherwise, the names will be x1, x2, ...
.
A data.frame
with the generated design; or if coding
is specified, a coded.data
object. The blocking variable, if present, will be a factor
; all other variables will be numeric.
To avoid aliasing the pure-quadratic terms, you must use a positive value n0
.
Russell V. Lenth
Meyers, RH and Montgomery, DC (2002), Response Surface Methodology (2nd ed.), Wiley-Interscience.
library(rsm) ### Simple 3-factor case, not randomized so structure is evident bbd(3, randomize=FALSE) ### 5-factor BBD, divided between two plants bbd(y1 + y2 ~ A + B + C + D + E, n0 = 5, block = "Plant")