DOE demo

First step

from doenova import doe_2f
doe = doe_2f()
plan = doe.make_plan(4,1,3,1,2)
# 4 factors, 1 generator, 3 replicates,
# 1 center point in each block,
# 2 blocks
doe.show_generators()
doe.export_plan("plan1", True)
# True as 2nd argument forces the randomization of the runs.

The previous code creates THIS FILE in the current directory.


Second step

The following code requires THIS FILE in the current directory.

from doenova import doe_2f
doe = doe_2f()
doe.import_plan("plan1_with_results")
#       A  B  C  D
sel = [[1, 0, 0, 0], # A
       [0, 1, 1, 0]] # BC
anova_comps = doe.anova(sel)
doe.show_model()
doe.show_regress_stats()
#                                 A    B    C    D
ypred = doe.predict_from_model([-.25, .5, -.75, .75])

The previous code shows the ANOVA table and the predictive model in the Python console. The 2-order interaction "BC" will be automatically ignored in the ANOVA as only single factors can be considered in a fractional factorial design with 4 factors and 1 generator.