Fractional Factorial Designs using FrF2

May 18th, 2011

The FrF2 package for R can be used to create regular and non-regular Fractional Factorial 2-level designs. It is reasonably straightforward to use.

First step is to install the package then make it available for use in the current session:


A basic call to the main functino FrF2 specifies the number of runs in the fractional factorial design (which needs to be a multiple of 2) and the number of factors. For example a three factor design would have a total of eight runs if it was a full factorial but if we wanted to go with four runs then we can generate the design like this:

> FrF2(4, 3)
   A  B  C
1  1 -1 -1
2 -1  1 -1
3 -1 -1  1
4  1  1  1
class=design, type= FrF2

The default output labels the factors A, B, C and so on and the factor levels are -1 and +1 for the two levels of each factor. We can change the level names to low and high using the default.levels function argument:

> FrF2(4, 3, default.levels = c("low", "high"))
     A    B    C
1 high high high
2  low high  low
3 high  low  low
4  low  low high
class=design, type= FrF2

The factors can be specified as a list of names rather than the number of factors via the factor.names argument:

> FrF2(4, factor.names = c("One", "Two", "Three"),
  default.levels = c("low", "high"))
   One  Two Three
1  low high   low
2 high high  high
3  low  low  high
4 high  low   low
class=design, type= FrF2

These are the basics and there are other features for greater control over the confounding between factors and their interactions that is introduced by using a fractional factorial design.

2 responses to “Fractional Factorial Designs using FrF2”

  1. Rudy Rooz says:

    This is an important and mysterious topic for those of us who don’t use it, but might if we understood it better. 🙂

    I would love to see a fully worked example with real data showing how the appropriate conclusion is reached by applying the FrF2 package. Perhaps something along the lines of Box, Hunter and Hunter.

  2. Ralph says:

    Thanks for the suggestion Rudy. I will see what I can put together to do with fractional factorials, aliasing, confounding and so on.