Computes level 5 fractional factorial designs for up to 120 factors using the agorithm of Sanchez and Sanchez (2005), and optionally central composite designs.

FFdes(size=5,ccd=FALSE)

Arguments

size

number of factors up to 120.

ccd

if TRUE, adds points along each axis at the same distance from the origin as the points in the fractional factorial design, to create the outer points of a central composite design. Add central points to complete.

Details

Basically a translation of the code provided in the appendix of Sanchez and Sanchez (2005).

References

Sanchez, S. M. & Sanchez, P. J. (2005) Very large fractional factorial and central composite designs. ACM Transactions on Modeling and Computer Simulation. 15: 362-377

Author

Simon N. Wood simon.wood@r-project.org

Examples

  require(mgcv)
  plot(rbind(0,FFdes(2,TRUE)),xlab="x",ylab="y",
       col=c(2,1,1,1,1,4,4,4,4),pch=19,main="CCD")

  FFdes(5)
#>       [,1] [,2] [,3] [,4] [,5]
#>  [1,]    1    1    1    1    1
#>  [2,]   -1    1    1    1   -1
#>  [3,]    1   -1    1    1   -1
#>  [4,]   -1   -1    1    1    1
#>  [5,]    1    1   -1    1   -1
#>  [6,]   -1    1   -1    1    1
#>  [7,]    1   -1   -1    1    1
#>  [8,]   -1   -1   -1    1   -1
#>  [9,]    1    1    1   -1   -1
#> [10,]   -1    1    1   -1    1
#> [11,]    1   -1    1   -1    1
#> [12,]   -1   -1    1   -1   -1
#> [13,]    1    1   -1   -1    1
#> [14,]   -1    1   -1   -1   -1
#> [15,]    1   -1   -1   -1   -1
#> [16,]   -1   -1   -1   -1    1
  FFdes(5,TRUE)
#>            [,1]      [,2]      [,3]      [,4]      [,5]
#>  [1,]  1.000000  1.000000  1.000000  1.000000  1.000000
#>  [2,] -1.000000  1.000000  1.000000  1.000000 -1.000000
#>  [3,]  1.000000 -1.000000  1.000000  1.000000 -1.000000
#>  [4,] -1.000000 -1.000000  1.000000  1.000000  1.000000
#>  [5,]  1.000000  1.000000 -1.000000  1.000000 -1.000000
#>  [6,] -1.000000  1.000000 -1.000000  1.000000  1.000000
#>  [7,]  1.000000 -1.000000 -1.000000  1.000000  1.000000
#>  [8,] -1.000000 -1.000000 -1.000000  1.000000 -1.000000
#>  [9,]  1.000000  1.000000  1.000000 -1.000000 -1.000000
#> [10,] -1.000000  1.000000  1.000000 -1.000000  1.000000
#> [11,]  1.000000 -1.000000  1.000000 -1.000000  1.000000
#> [12,] -1.000000 -1.000000  1.000000 -1.000000 -1.000000
#> [13,]  1.000000  1.000000 -1.000000 -1.000000  1.000000
#> [14,] -1.000000  1.000000 -1.000000 -1.000000 -1.000000
#> [15,]  1.000000 -1.000000 -1.000000 -1.000000 -1.000000
#> [16,] -1.000000 -1.000000 -1.000000 -1.000000  1.000000
#> [17,]  2.236068  0.000000  0.000000  0.000000  0.000000
#> [18,]  0.000000  2.236068  0.000000  0.000000  0.000000
#> [19,]  0.000000  0.000000  2.236068  0.000000  0.000000
#> [20,]  0.000000  0.000000  0.000000  2.236068  0.000000
#> [21,]  0.000000  0.000000  0.000000  0.000000  2.236068
#> [22,] -2.236068  0.000000  0.000000  0.000000  0.000000
#> [23,]  0.000000 -2.236068  0.000000  0.000000  0.000000
#> [24,]  0.000000  0.000000 -2.236068  0.000000  0.000000
#> [25,]  0.000000  0.000000  0.000000 -2.236068  0.000000
#> [26,]  0.000000  0.000000  0.000000  0.000000 -2.236068