Full factorial design

From doenova, import the full-factorial (FF) function and creates a new DOE.

from doenova import expffplan
exp = expffplan()

In a FF design, the number of levels for each factor must be specified. These numbers must be placed into list brackets [] when making the plan:

plan = exp.make_plan([2,3])

[2,3] specifies that there are 2 levels for the first factor and 3 levels for the second factor. There is then a total of 2 factors in this experiment. The function returns the variable plan which is a Numpy Array containing the DOE.

By default, there is no replicate in the DOE. Replicates can be added with the second argument while calling the make_plan function.

plan = exp.make_plan([2,3], 2)

In the previous line, the second input argument of make_plan has a value of 2, which specifies that 2 replicates per experimental combination is required.

The plan and the total of runs can be shown in the console with the following function:


Once the experiments are completed, the results can be added to the exp variable. The same numbers of results must match with the number of runs. The results must be provided position-wise to the plan. Then, the first provided result is related to the first row presented with show_plan(), and so on. In the following line, 12 results are provided:


Once the results are provided, the ANOVA table can be calculated:

anova_comps = exp.anova()

By doing the previous line, the ANOVA table is automatically presented in the console. The ANOVA table components are also being found in the anova_comps dictionary variable.

By default, all factors and possible combinations of factors are considered in the ANOVA table. It is possible to only select some factors or combinations. For this, a Numpy Array must be created prior calling the anova function. The number of columns must match with the number of factors in the DOE. Each row of this Numpy Array corresponds to one selection of a single factor or a combination of factors. For example,

import numpy as np
selection = np.array([[1,0],

The [1,0] row first says that the first factor must be included in the ANOVA table. The [1,1] second row says that the combination of the first two factors must be included in the ANOVA table. The selection variable must be input as an argument when calling the anova function:

anova_comps = exp.anova(selection)

The updated ANOVA table does not include the single second factor (without interactions) as it was not specified in the selection.