cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
modelcitizen89
Level II

Can I define/constrain number of runs for each level of a categorical factor in custom design?

Dear JMP community,

 

I am in the processing of exploring the JMP and trying to make it work out a custom design for a bioprocess involved with 3 continuous factors and two categorical factors and some factor constrains. I would like to group same number of runs into each level of one of two categorical factors (6 levels in total, it is a "vessel"-like factor to contain different runs essentially).  Is there a possible way I can define or constrain the categorical factor to make it work.  It seems to me a more logical way is to define this categorical factor as a block effect instead. I have tried that option but then I would not allow me to keep the factor constrains that I had set up. Any guidance and explanation would be truly appreciated! 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
SDF1
Super User

Re: Can I define/constrain number of runs for each level of a categorical factor in custom design?

Hi @modelcitizen89 ,

 

  Thanks for sharing your script, that helps to see things a little more clearly.  I can confirm your original error message: JMP does not allow disallowed combinations when explicitly including a Blocking variable in the model. You can include disallowed combinations if you leave Container as a categorical variable, then you can have the constraints present, but you get a different number of runs for each Container, which you want to keep fixed.

 

  I don't know if this is an appropriate way to get around that, but you can do what you are looking for by removing Container as a variable (it's not in your model, except as a main effect (by default); you are not looking at any interactions between the container and other factors). Instead of having Container as a categorical variable or blocking factor, you can set the DOE to generate it such that you have random block sizes (which you would choose as the number of vessels, 6). By default, the DOE wants to do 28, but this doesn't allow for an equal number of runs within each block size, so you need to change this to 36. This will generate a DOE for you with the constraints and the appropriate "containers". Again, I'm not sure this is the appropriate use, but it might get you to a place that allows you to set up your experiments.

 

  Lastly, I'm not positive, but I think there might have be an error in the disallowed script. Below is the JSL output from the Custom DOE that I ran with your constraints and using the runs per random block as the containers. I think this is what you want.

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 0.005, 0.03, "A", 0 ),
	Add Factor( Continuous, 0, 0.03, "B/C", 0 ),
	Add Factor( Continuous, -1, 1, "D", 0 ), Add Factor( Continuous, -1, 1, "E", 0 ),
	Add Factor( Categorical, {"B", "C"}, "Ingredient", 0 ),
	Set Random Seed( 531473239 ), Number of Starts( 11 ), Add Term( {1, 0} ),
	Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
	Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
	Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ),
	Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ),
	Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ),
	Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Add Term( {1, 2} ),
	Add Term( {2, 2} ), Add Term( {3, 2} ), Add Term( {4, 2} ),
	Set Runs Per Random Block( 6 ), Set Sample Size( 36 ),
	Disallowed Combinations(
		Ingredient == "B" & ("B/C"n >= 0.02 & "B/C"n <= 0.03) | "B/C"n == 0 & (A >=
		0 & A <= 0.015)
	), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design,
	Set Run Order( Keep the Same ), Make Table}
);

  Hope this helps,

DS

View solution in original post

4 REPLIES 4
SDF1
Super User

Re: Can I define/constrain number of runs for each level of a categorical factor in custom design?

Hi @modelcitizen89 ,

 

  I am sure there is a way to do this, but I think more information is needed. Can you provide some more details without revealing any specifics of your situation? You can keep the factors as X1 and settings as -1 to 1 or the categoricals as L1, L2, etc. Also, without knowing what the actual constraints are -- are they on the continuous variables or on categorical? This would change how you include them as linear constraints or as disallowed combinations.

 

  Using the Custom Design DOE platform would be the best option, I think. Without knowing what the constraints are and just mocking something up based on what I understand from your description, the below is a design with 3 continuous factors X1, X2, X3, two 3-level categorical factors X4, X5 with levels L1, L2, L3, and a Blocking factor. Each Block will have three runs with each level of X4 and X5 being represented, as well as the appropriate combinations of low and high levels of the continuous factors.

Snap1.png

Snap2.png

  From your description, this sounds somewhat like what you're after. Again, there's no constraints on the system right now since that was not defined.

  Does this help, or is it not what you're after? If you can provide more details, that could help get you in the right direction.

 

Hope this helps,

DS

Re: Can I define/constrain number of runs for each level of a categorical factor in custom design?

This situation sounds like the categorical variables are hard to change. See the documentation about split-plot designs.

 

Your choice of the number of whole plots and the number of runs should give you the numbers you want per whole plot.

modelcitizen89
Level II

Re: Can I define/constrain number of runs for each level of a categorical factor in custom design?

Hi @Mark_Bailey and @SDF1 , thank you so much for your input. I have listed below my on-going design in the script.

 

Basically what I am looking into is to create a set of runs that will need to be actually executed in individual "container" (hence the categorical factor - "container", I currently set it at 6. L1,...,L6)). The maximal runs for each "container" at the time is 7 or below, and I would like to keep that number consistent across all "containers" .

 

The other factors include a constant present ingredient A; two mutually exclusive ingredient B and C which has its own range (with an additional categorical factor to define the presence of B or C); two other ingredients D or E. There are some constraints mostly set around to define the different range of B and C, as well as the range change on A when B or C does/doesn't present.

 

Thanks again for looking into this.

 

M

 

DOE(
	Custom Design,
	{Add Response( Maximize, "Response ", ., ., . ),
	Add Factor( Continuous, 0.005, 0.03, "A", 0 ),
	Add Factor( Continuous, 0, 0.03, "BorC", 0 ),
	Add Factor( Continuous, -1, 1, "D", 0 ), Add Factor( Continuous, -1, 1, "E", 0 ),
	Add Factor( Categorical, {"B", "C"}, "ingredient BorC", 0 ),
	Add Factor( Categorical, {"L1", "L2", "L3", "L4", "L5", "L6"}, "container", 0 ),
	Set Random Seed( 802458459 ), Number of Starts( 2 ), Add Term( {1, 0} ),
	Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
	Add Term( {5, 1} ), Add Term( {6, 1} ), Add Term( {1, 1}, {2, 1} ),
	Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ),
	Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ),
	Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ),
	Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ),
	Add Term( {4, 1}, {5, 1} ), Add Term( {1, 2} ), Add Term( {2, 2} ),
	Add Term( {3, 2} ), Add Term( {4, 2} ), Add Alias Term( {1, 1}, {6, 1} ),
	Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {3, 1}, {6, 1} ),
	Add Alias Term( {4, 1}, {6, 1} ), Add Alias Term( {5, 1}, {6, 1} ),
	Replicates( 1 ), Set Sample Size( 36 ),
	Disallowed Combinations(
		ingredient == "B" & (BorC >= 0.02 & BorC <= 0.03) | BorC == 0 & (A >= 0 & A
		 <= 0.015)
	), Simulate Responses( 0 ), Save X Matrix( 0 ), Set Run Order( Keep the Same ),
	Make Table}
);

 

SDF1
Super User

Re: Can I define/constrain number of runs for each level of a categorical factor in custom design?

Hi @modelcitizen89 ,

 

  Thanks for sharing your script, that helps to see things a little more clearly.  I can confirm your original error message: JMP does not allow disallowed combinations when explicitly including a Blocking variable in the model. You can include disallowed combinations if you leave Container as a categorical variable, then you can have the constraints present, but you get a different number of runs for each Container, which you want to keep fixed.

 

  I don't know if this is an appropriate way to get around that, but you can do what you are looking for by removing Container as a variable (it's not in your model, except as a main effect (by default); you are not looking at any interactions between the container and other factors). Instead of having Container as a categorical variable or blocking factor, you can set the DOE to generate it such that you have random block sizes (which you would choose as the number of vessels, 6). By default, the DOE wants to do 28, but this doesn't allow for an equal number of runs within each block size, so you need to change this to 36. This will generate a DOE for you with the constraints and the appropriate "containers". Again, I'm not sure this is the appropriate use, but it might get you to a place that allows you to set up your experiments.

 

  Lastly, I'm not positive, but I think there might have be an error in the disallowed script. Below is the JSL output from the Custom DOE that I ran with your constraints and using the runs per random block as the containers. I think this is what you want.

DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, 0.005, 0.03, "A", 0 ),
	Add Factor( Continuous, 0, 0.03, "B/C", 0 ),
	Add Factor( Continuous, -1, 1, "D", 0 ), Add Factor( Continuous, -1, 1, "E", 0 ),
	Add Factor( Categorical, {"B", "C"}, "Ingredient", 0 ),
	Set Random Seed( 531473239 ), Number of Starts( 11 ), Add Term( {1, 0} ),
	Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ),
	Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
	Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ),
	Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ),
	Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ),
	Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Add Term( {1, 2} ),
	Add Term( {2, 2} ), Add Term( {3, 2} ), Add Term( {4, 2} ),
	Set Runs Per Random Block( 6 ), Set Sample Size( 36 ),
	Disallowed Combinations(
		Ingredient == "B" & ("B/C"n >= 0.02 & "B/C"n <= 0.03) | "B/C"n == 0 & (A >=
		0 & A <= 0.015)
	), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design,
	Set Run Order( Keep the Same ), Make Table}
);

  Hope this helps,

DS