将列表添加到分类DoE
我尝试了很多迭代,包括大括号,不包括大括号,包括引号等,但无法弄清楚如何使用jsl将列表投射到新的DoE。这个想法是尝试实现以下内容:
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 )}
);
美国能源部脚本编写回复:将列表添加到分类DoE您只需要在列表周围添加一个Eval()
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 )}
);回复:将列表添加到分类DoE你好 @txnelson ,
非常感谢您的回复。您是否尝试运行该代码?我只是尝试过,但仍然没有得到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 )}
);
回复:将列表添加到分类DoE您对之前的代码无法正常使用是正确的.....我没有仔细检查结果。 但是这是一段有效的代码

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
)
);回复:将列表添加到分类DoE与Parse()或Parse(Eval(或Eval(Parse(...