Ciao
Ho usato sottoinsieme per generare tutti i fattori per 8 fattori, ad esempio per 2 fattori attivi che iniziano con F1 con F2, F1 con F3, fino ai fattori F7 con F8 quindi ho usato il ciclo per contunue fino a trovare 6 fattori attivi su 8
il mio problema quando cerco di valutare tutti i progetti, mi mostra solo per un progetto quindi non esiste un ciclo di valutazione per tutti gli altri 27 progetti
Spero che il mio script possa spiegare quello che voglio.
dt2_5_2=New Table( "First Example",
Add Rows( 17 ),
New Column( "Column 1",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, -1, -1, 0, -1, 0, -1, -1, 0, -1, 1, 1, 0, 1, 0, 1, 1] )
),
New Column( "Column 2",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 1, 0, 1, 0, 1, -1, 1, 0, -1, -1, 0, -1, 0, -1, 1, -1] )
),
New Column( "Column 3",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 0, 1, -1, 1, -1, -1, 0, 0, -1, 0, -1, 1, -1, 1, 1, 0] )
),
New Column( "Column 4",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0, -1, 1, 1, -1, -1, 0, 1, 0, 0, 1, -1, -1, 1, 1, 0, -1] )
),
New Column( "Column 5",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 0, -1, 1, 1, -1, 1, 0, 0, -1, 0, 1, -1, -1, 1, -1, 0] )
),
New Column( "Column 6",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [0, -1, 1, 1, 1, 1, 0, -1, 0, 0, 1, -1, -1, -1, -1, 0, 1] )
),
New Column( "Column 7",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 1, 1, 0, -1, 0, 1, -1, 0, -1, -1, -1, 0, 1, 0, -1, 1] )
),
New Column( "Column 8",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Selected,
Set Values( [1, -1, 0, -1, 0, 1, 1, 1, 0, -1, 1, 0, 1, 0, -1, -1, -1] )
),
Set Row States( [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] )
);
NamesDefaultToHere(1);
dt = DataTable("First Example");
cols = dt << getColumnNames;
for(c1 = 1, c1<= NItems(cols), c1++,
for(c2 = c1+1, c2 <= NItems(cols), c2++,
for(c3= c2+1, c3 <= NItems(cols), c3++,
for(c4= c3+1, c4 <= NItems(cols), c4++,
for(c5= c4+1, c5 <= NItems(cols), c5++,
for(c6= c5+1, c6 <= NItems(cols), c6++,
//dt << Subset(Columns(cols[c1], cols[c2]))
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3]));
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3], cols[c4]));
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3], cols[c4], cols[c5]));
dt << Subset(Columns(cols[c1], cols[c2], cols[c3], cols[c4], cols[c5], cols[c6]));
DOE(
Evaluate Design,
X( :Column 1, :Column 2, :Column 3, :Column 4, :Column 5, :Column 6 ),
{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 Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ),
Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {1, 1}, {5, 1} ),
Add Alias Term( {1, 1}, {6, 1} ), Add Alias Term( {2, 1}, {3, 1} ),
Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ),
Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {3, 1}, {4, 1} ),
Add Alias Term( {3, 1}, {5, 1} ), Add Alias Term( {3, 1}, {6, 1} ),
Add Alias Term( {4, 1}, {5, 1} ), Add Alias Term( {4, 1}, {6, 1} ),
Add Alias Term( {5, 1}, {6, 1} )}
);
);
);
);
);
);
);
Molte grazie
Medo
Il problema è che hai codificato con difficoltà i nomi delle colonne Colonna 1, Colonna 2, ..., Colonna 6 nella parte DOE (Valuta il design, ...) dello script e solo il primo sottoinsieme generato dal tuo loop contiene quel set di colonne.
Prova questo:
For( c1 = 1, c1 <= N Items( cols ), c1++,
For( c2 = c1 + 1, c2 <= N Items( cols ), c2++,
For( c3 = c2 + 1, c3 <= N Items( cols ), c3++,
For( c4 = c3 + 1, c4 <= N Items( cols ), c4++,
For( c5 = c4 + 1, c5 <= N Items( cols ), c5++,
For( c6 = c5 + 1, c6 <= N Items( cols ), c6++,
//dt << Subset(Columns(cols[c1], cols[c2]))
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3]));
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3], cols[c4]));
//dt << Subset(Columns(cols[c1], cols[c2], cols[c3], cols[c4], cols[c5]));
dt2 = dt << Subset(
Columns(
cols[c1],
cols[c2],
cols[c3],
cols[c4],
cols[c5],
cols[c6]
)
);
dt2 << Evaluate Design(
X(
cols[c1],
cols[c2],
cols[c3],
cols[c4],
cols[c5],
cols[c6]
),
{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 Alias Term( {1, 1}, {2, 1} ),
Add Alias Term( {1, 1}, {3, 1} ),
Add Alias Term( {1, 1}, {4, 1} ),
Add Alias Term( {1, 1}, {5, 1} ),
Add Alias Term( {1, 1}, {6, 1} ),
Add Alias Term( {2, 1}, {3, 1} ),
Add Alias Term( {2, 1}, {4, 1} ),
Add Alias Term( {2, 1}, {5, 1} ),
Add Alias Term( {2, 1}, {6, 1} ),
Add Alias Term( {3, 1}, {4, 1} ),
Add Alias Term( {3, 1}, {5, 1} ),
Add Alias Term( {3, 1}, {6, 1} ),
Add Alias Term( {4, 1}, {5, 1} ),
Add Alias Term( {4, 1}, {6, 1} ),
Add Alias Term( {5, 1}, {6, 1} )}
);
Close(dt2, no save);
)
)
)
)
)
);Noterai che ho cambiato i riferimenti delle colonne a cols [c1], cols [c2], ecc. Ho anche chiamato la tabella dei dati dei sottogruppi dt2 e chiuso ogni tabella di dati dei sottoinsiemi dopo aver prodotto il rapporto Valuta progetto per non ingombrare ulteriormente lo spazio di lavoro in JMP.