rsmDesign: Generate a response surface design.
Source:R/3.3_Factorial_designs_Functions.R
rsmDesign.RdGenerates a response surface design containing a cube, centerCube, star, and centerStar portion.
Usage
rsmDesign(
k = 3,
p = 0,
alpha = "rotatable",
blocks = 1,
cc = 1,
cs = 1,
fp = 1,
sp = 1,
faceCentered = FALSE
)Arguments
- k
Integer value giving the number of factors. By default,
kis set to `3`.- p
Integer value giving the number of additional factors in the response surface design by aliasing effects. Default is `0`.
- alpha
Character string indicating the type of star points to generate. Should be
`rotatable`(default),`orthogonal`, or`both`. If`both`, values forccandcswill be discarded.- blocks
Integer value specifying the number of blocks in the response surface design. Default is `1`.
- cc
Integer value giving the number of centerpoints (per block) in the cube portion (i.e., the factorial 2^k design) of the response surface design. Default is `1`.
- cs
Integer value specifying the number of centerpoints in the star portion. Default is `1`.
- fp
Integer value giving the number of replications per factorial point (i.e., corner points). Default is `1`.
- sp
Integer value specifying the number of replications per star point. Default is `1`.
- faceCentered
Logical value indicating whether to use a faceCentered response surface design (i.e.,
alpha= `1`). Default isFALSE.
Value
The function returns an object of class facDesign.c.
Details
Generated designs consist of a cube, centerCube, star, and centerStar portion. The replication structure can be set with the parameters cc (centerCube), cs (centerStar), fp (factorialPoints), and sp (starPoints).
Examples
# Example 1: Central composite design for 2 factors with 2 blocks, alpha = 1.41,
# 5 centerpoints in the cube portion and 3 centerpoints in the star portion:
rsmDesign(k = 2, blocks = 2, alpha = sqrt(2), cc = 5, cs = 3)
#> StandOrd RunOrder Block A B y
#> 6 6 1 1 0.000 0.000 NA
#> 5 5 2 1 0.000 0.000 NA
#> 8 8 3 1 0.000 0.000 NA
#> 4 4 4 1 1.000 1.000 NA
#> 9 9 5 1 0.000 0.000 NA
#> 1 1 6 1 -1.000 -1.000 NA
#> 7 7 7 1 0.000 0.000 NA
#> 2 2 8 1 1.000 -1.000 NA
#> 3 3 9 1 -1.000 1.000 NA
#> 10 10 10 2 -1.414 0.000 NA
#> 14 14 11 2 0.000 0.000 NA
#> 13 13 12 2 0.000 1.414 NA
#> 15 15 13 2 0.000 0.000 NA
#> 16 16 14 2 0.000 0.000 NA
#> 12 12 15 2 0.000 -1.414 NA
#> 11 11 16 2 1.414 0.000 NA
# Example 2: Central composite design with both, orthogonality and near rotatability
rsmDesign(k = 2, blocks = 2, alpha = "both")
#> StandOrd RunOrder Block A B y
#> 6 6 1 1 0.000 0.000 NA
#> 2 2 2 1 1.000 -1.000 NA
#> 7 7 3 1 0.000 0.000 NA
#> 5 5 4 1 0.000 0.000 NA
#> 3 3 5 1 -1.000 1.000 NA
#> 1 1 6 1 -1.000 -1.000 NA
#> 4 4 7 1 1.000 1.000 NA
#> 9 9 8 2 1.414 0.000 NA
#> 8 8 9 2 -1.414 0.000 NA
#> 13 13 10 2 0.000 0.000 NA
#> 12 12 11 2 0.000 0.000 NA
#> 11 11 12 2 0.000 1.414 NA
#> 10 10 13 2 0.000 -1.414 NA
#> 14 14 14 2 0.000 0.000 NA
# Example 3: Central composite design with:
# 2 centerpoints in the factorial portion of the design (i.e., 2)
# 1 centerpoint in the star portion of the design (i.e., 1)
# 2 replications per factorial point (i.e., 2^3*2 = 16)
# 3 replications per star point (i.e., 3*2*3 = 18)
# Makes a total of 37 factor combinations
rsdo = rsmDesign(k = 3, blocks = 1, alpha = 2, cc = 2, cs = 1, fp = 2, sp = 3)