Add list to categorical DoE
I've tried many iterations of including curly brackets, not including them, including quotes, etc., but can't figure out how to cast a list to a new DoE with jsl. The idea is to try and achieve something like what is below:
itemList = {"item 1", "item 2", "item 3"};
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Categorical, itemList, "item", 0 ),
Set Random Seed( 5111413 ), Simulate Responses( 0 ), Save X Matrix( 0 )}
);
DOEScriptingRe: Add list to categorical DoESame with Parse(), or Parse( Eval(, or Eval( Parse(...Re: Add list to categorical DoEYou are correct about the previous code not working.....I did not examine the results close enough. But here is a piece of code that does work

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Summarize( dt, itemList = By( :sex ) );
Eval(
Substitute(
Expr(
DOE(
Custom Design,
{Add Response( Maximize, "height", ., ., . ),
Add Factor( Categorical, __list__, "Sex", 0 ),
Set Random Seed( 5111413 ), Simulate Responses( 0 ), Save X Matrix( 0 )}
)
),
Expr( __list__ ), itemList
)
);Re: Add list to categorical DoEHi @txnelson ,
Thank you very much for your reply. Did you try running that code? I just tried and still didn't get the list populating the DoE.
Names Default to Here (1);
itemList = {"item 1", "item 2", "item 3"};
DOE(
Custom Design,
{Add Response( Maximize, "Y", ., ., . ),
Add Factor( Categorical, Eval(itemList), "item", 0 ),
Set Random Seed( 5111413 ), Simulate Responses( 0 ), Save X Matrix( 0 )}
);
Re: Add list to categorical DoEYou just need to add an Eval() around the list
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
summarize(dt,itemList = By(:sex));
DOE(
Custom Design,
{Add Response( Maximize, "height", ., ., . ),
Add Factor( Categorical, eval(itemList), "item", 0 ),
Set Random Seed( 5111413 ), Simulate Responses( 0 ), Save X Matrix( 0 )}
);