Hi @frejam,
I would recommend setting the factor ML HBA as a discrete numeric with three levels instead of a 3-levels categorical factor, as the ordering between levels is taken into consideration with the discrete numeric factor type, and it does suit better your experimental design from what I see. It also facilitates the creation of the disallowed combinations constraint.
If I set up the disallowed combinations like these :
Or in a script version :
HBA == "ChCl" & ML HBA <= 0.5 | HBA == "No HBA" & ML HBA >= 0.5
Then the generated design seems to respect the constraint you want:
Here is the script to generate the design (I assumed a model with main effects and 2-factors interactions) :
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Continuous, 1, 2, "Molar ratio HBD", 0 ),
Add Factor( Categorical, {"Oxalic acid", "Citric acid"}, "HBD", 0 ),
Add Factor( Categorical, {"ChCl", "No HBA"}, "HBA", 0 ),
Add Factor( Discrete Numeric, {0, 1, 2}, "ML HBA", 0 ),
Set Random Seed( 2109323028 ), Number of Starts( 3867 ), Add Term( {1, 0} ),
Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
Add Potential Term( {4, 2} ), Add Term( {1, 1}, {2, 1} ),
Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ),
Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ),
Add Term( {3, 1}, {4, 1} ), Set Sample Size( 18 ),
Disallowed Combinations(
HBA == "ChCl" & ML HBA <= 0.5 | HBA == "No HBA" & ML HBA >= 0.5
), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design}
)
And you can find the datatable attached.
The analysis should be done carefully, as you might have a nested effect of "ML HBA" inside "HBA" : the level 0 for factor "ML HBA" is only accessible for the level No HBA of factor "HBA".
Hope this answer will help you,
Victor GUILLER
L'Oréal Data & Analytics
"It is not unusual for a well-designed experiment to analyze itself" (Box, Hunter and Hunter)