Aggiungi elenco a DoE categorico
Ho provato molte iterazioni per includere parentesi graffe, non includerle, tra virgolette, ecc., Ma non riesco a capire come trasmettere un elenco a un nuovo DoE con jsl. L'idea è di cercare di ottenere qualcosa di simile a ciò che è sotto:
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 )}
);
DOEScriptingRi: Aggiungi elenco a DoE categoricoDevi solo aggiungere un Eval () all'elenco
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 )}
);Ri: Aggiungi elenco a DoE categoricoCiao @txnelson ,
La ringrazio molto per la risposta. Hai provato a eseguire quel codice? Ho appena provato e non ho ancora ottenuto l'elenco che popola il 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 )}
);
Ri: Aggiungi elenco a DoE categoricoHai ragione sul fatto che il codice precedente non funziona ..... Non ho esaminato i risultati abbastanza da vicino. Ma ecco un pezzo di codice che funziona

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
)
);Ri: Aggiungi elenco a DoE categoricoLo stesso vale per Parse () o Parse (Eval (, o Eval (Parse (...