cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ChrisMuenzer
Level II

How to use a variable in JSL to set the levels of a DOE factor?

I'm trying to add a factor to a DOE using a variable instead of hard coding the levels. The end goal is to provide the user with a simple interface set the levels for one of the factors.

 

The following code doesn't work and the factor just ends up with L1 and L2 as levels.

 

Names Default To Here( 1 );

levels = List(1,2,3);

d = DOE(
	Custom Design,
	Add factor(Discrete Numeric, levels)
);
d << Make Design;
d << Make Table;
2 REPLIES 2

Re: How to use a variable in JSL to set the levels of a DOE factor?

Here is an example I created interactively with a Continous factor and a Discrete Numeric factor.

levels = {1, 2, 3};

obj = DOE(
	Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, -1, 1, "X1", 0 )}
);

Eval(
	Substitute(
		Expr( obj << Add Factor( Discrete Numeric, LLL, "X2", 0 ) ),
		Expr( LLL ),
		levels
	)
);
GL970879
Level I

Re: How to use a variable in JSL to set the levels of a DOE factor?

Hello~

According to  the example that you created, how to use variables for the "levels", and then add a "Categorical" factor to obj?
For example:
value = "11";
value = "21";
value = "31";
levels = {value1, value2, value3};

 

Thanks!

Recommended Articles