Blocks a given factorial or response surface design.
Arguments
- fdo
An object of class
facDesign.c.- blocks
Numeric value giving the number of blocks.
- random.seed
Numeric value to generate repeatable results for randomization within blocks.
- useTable
Character indicating which table to use. The following options will be accepted:
`rms`: table from reference`calc`: table calculated by package
- gen
Giving the generator that will be used.
Value
The function blocking returns an object of class facDesign.c with blocking structure.
Examples
# Example 1
#Create a 2^3 full factorial design
fdo <- facDesign(k = 3)
# Apply blocking to the design with 2 blocks
blocking(fdo, 2)
#> StandOrder RunOrder Block A B C y
#> 7 7 1 1 -1 1 1 NA
#> 4 4 2 1 1 1 -1 NA
#> 6 6 3 1 1 -1 1 NA
#> 1 1 4 1 -1 -1 -1 NA
#> 5 5 5 2 -1 -1 1 NA
#> 2 2 6 2 1 -1 -1 NA
#> 8 8 7 2 1 1 1 NA
#> 3 3 8 2 -1 1 -1 NA
# Example 2
#Create a response surface design for 3 factors
fdo <- rsmDesign(k = 3)
# Apply blocking to the design with 3 blocks (1 block for star part and 2 blocks for the cube part)
blocking(fdo, 3)
#> StandOrd RunOrder Block A B C y
#> 4 4 1 1 1.000 1.000 -1.000 NA
#> 1 1 2 1 -1.000 -1.000 -1.000 NA
#> 7 7 3 1 -1.000 1.000 1.000 NA
#> 9 9 4 1 0.000 0.000 0.000 NA
#> 6 6 5 1 1.000 -1.000 1.000 NA
#> 5 5 6 2 -1.000 -1.000 1.000 NA
#> 3 3 7 2 -1.000 1.000 -1.000 NA
#> 8 8 8 2 1.000 1.000 1.000 NA
#> 2 2 9 2 1.000 -1.000 -1.000 NA
#> 10 10 10 2 0.000 0.000 0.000 NA
#> 12 12 11 3 1.682 0.000 0.000 NA
#> 14 14 12 3 0.000 1.682 0.000 NA
#> 16 16 13 3 0.000 0.000 1.682 NA
#> 17 17 14 3 0.000 0.000 0.000 NA
#> 11 11 15 3 -1.682 0.000 0.000 NA
#> 13 13 16 3 0.000 -1.682 0.000 NA
#> 15 15 17 3 0.000 0.000 -1.682 NA