Plackett-Burman design

From doenova, import the Plackett-Burman (PB) function and creates a new DOE.

from doenova import exppbplan
exp = exppbplan()

In a FF design, the number of factors must be specified. In the following line, a DOE with 4 factors is created:

plan = exp.make_plan(4)

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(4, 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:

exp.show_plan()

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, 16 results are provided:

exp.insert_results([3.3,3.6,5.6,5.3,7.8,7.0,5.6,5.2,
                    2.3,2.4,5.6,5.1,3.2,2.9,4.8,4.4])

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,0,0],
                      [0,0,1,0]])

The [1,0,0,0] row first says that the first factor must be included in the ANOVA table. The [0,0,1,0] second row says that the third factor 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 second and fourth factors (without interactions) as it was not specified in the selection.

Finally, a regression model can be calculated with the following command:

exp.make_regression()

Only the variables and interactions of variables specified in the selection variable while calling the anova function will be considered in the model. To perform a prediction from the model, use the following command:

exp.predict_from_model([.5,.6,.2,-.5])