Per loop per adattamento minimo quadratoCiao,
Cerco di estrarre il diagramma di contorno dal modello meno quadrato in forma. Quindi, genero il ciclo for in modo da poter ottenere il modello variando uno dei fattori.
Il problema è che, dopo aver eseguito lo script, tutti i grafici mostrano lo stesso fattore (supponiamo di variare l'ID Boule). Mostrerà l'ultimo ID Boule su tutte le schede che ho generato.
names default to here (1);
dt = current data table ();
listID = {"108400", "108610", "109105", "109350", "109838", "109900", "109903", "109904",
"110397", "110422", "110423", "110939", "111167", "111206", "111309", "111704",
"112505", "113023", "113045", "113227", "113344", "113504", "115983", "116118",
"116489", "116490", "116534", "116609", "119687", "119849", "119852", "120478",
"120856", "121030", "121117", "121640"} ;
nw = new window ("Contour", tb = tab box(),my vlb = v list box());
for (i = 1, i<= n items (listID), i++,
tb << add (listID[i], my vlb = v list box());
my vlb<< append(obj = Fit Model(
Y( :Center_Median_BAPL ),
Effects(
:PLMedian & RS,
:Boule_Position & RS,
:Boule_Position * :Boule_Position,
:Boule_ID
),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
PLMedian( 925.7, Min( 908 ), Lock( 0 ), Show( 1 ) ),
Boule_Position( 0.82, Lock( 0 ), Show( 1 ) ),
Boule_ID( listID[i], Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
PLMedian << Fixed( 925.7 ),
Boule_Position << Fixed( 0.82 )
),
Responses( Center_Median_BAPL << No Noise )
),
Simulator( 0 )
),
Contour Profiler(
1,
Term Value(
PLMedian( 925.7, Min( 910 ), Max( 925 ), Lock( 0 ), Show( 1 ) ),
Boule_Position( 0.82, Lock( 0 ), Show( 1 ) ),
Boule_ID( listID[i], Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
PLMedian << Fixed( 925.7 ),
Boule_Position << Fixed( 0.82 )
),
Responses( Center_Median_BAPL << No Noise )
),
Simulator( 0 ),
Contour Value(
Center_Median_BAPL(
903.5,
Lo Limit( 901 ),
Hi Limit( 905 ),
Min( 893.5 ),
Max( 913.5 )
)
),
Grid Density( "40 x 40" ),
Contour Grid( 900, 910, 1, Center_Median_BAPL ),
Horizontal Factor( :Boule_Position ),
Vertical Factor( :PLMedian )
),
:Center_Median_BAPL << {Summary of Fit( 0 ), Analysis of Variance( 0),
Parameter Estimates( 0 ), Scaled Estimates( 0 ), EffectSummary(0),Lack Of Fit (0), Effect Tests(0), Prediction Profiler (0),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals(0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 ), Show VIF( 0)}
),
Local Data Filter(
Add Filter(
columns( :Boule_Position ),
Where( :Boule_Position >= 0.5992 & :Boule_Position <= 0.82 )
)
),
SendToReport(
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"1",
ScaleBox,
{Min( 0.5992 ), Max( 0.82 ), Inc( 0.02 ), Minor Ticks( 0 ),
Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"2",
ScaleBox,
{Min( 908 ), Max( 925 ), Inc( 1 ), Minor Ticks( 0 ),
Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"Contour Profiler Frame",
FrameBox,
{Frame Size( 513, 467 ), DispatchSeg(
Contour Seg( 4 ),
{Line Color( "None" ), Fill Color( {212, 73, 88} )}
)}
)
)
);
)
);
ScriptingRi: Per loop per adattamento minimo quadratoCredo che quello che sta succedendo è che tutto il codice della tua piattaforma viene aggiunto alla tua casella di riepilogo V () prima che venga eseguito, e quando viene eseguito, tutti i valori della variabile i sono gli stessi, quindi ho modificato il codice da sostituire nel valore esatto della variabile, prima che avvenga l'appendice.
Provalo e vedi se aiuta ... Non ho potuto testare il codice poiché non ho la tua tabella dati con tutte le specifiche per l'analisi.
Names Default To Here( 1 );
dt = Current Data Table();
listID = {"108400", "108610", "109105", "109350", "109838", "109900", "109903", "109904", "110397", "110422", "110423", "110939", "111167", "111206",
"111309", "111704", "112505", "113023", "113045", "113227", "113344", "113504", "115983", "116118", "116489", "116490", "116534", "116609", "119687",
"119849", "119852", "120478", "120856", "121030", "121117", "121640"};
nw = New Window( "Contour", tb = Tab Box(), my vlb = V List Box() );
For( i = 1, i <= N Items( listID ), i++,
tb << Add( listID[i], my vlb = V List Box() );
Eval(
Substitute(
Expr(
my vlb << append(
obj = Fit Model(
Y( :Center_Median_BAPL ),
Effects( :PLMedian & RS, :Boule_Position & RS, :Boule_Position * :Boule_Position, :Boule_ID ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
PLMedian( 925.7, Min( 908 ), Lock( 0 ), Show( 1 ) ),
Boule_Position( 0.82, Lock( 0 ), Show( 1 ) ),
Boule_ID( __listID__, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
PLMedian << Fixed( 925.7 ),
Boule_Position << Fixed( 0.82 )
),
Responses( Center_Median_BAPL << No Noise )
),
Simulator( 0 )
),
Contour Profiler(
1,
Term Value(
PLMedian( 925.7, Min( 910 ), Max( 925 ), Lock( 0 ), Show( 1 ) ),
Boule_Position( 0.82, Lock( 0 ), Show( 1 ) ),
Boule_ID( __listID__, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
PLMedian << Fixed( 925.7 ),
Boule_Position << Fixed( 0.82 )
),
Responses( Center_Median_BAPL << No Noise )
),
Simulator( 0 ),
Contour Value( Center_Median_BAPL( 903.5, Lo Limit( 901 ), Hi Limit( 905 ), Min( 893.5 ), Max( 913.5 ) ) ),
Grid Density( "40 x 40" ),
Contour Grid( 900, 910, 1, Center_Median_BAPL ),
Horizontal Factor( :Boule_Position ),
Vertical Factor( :PLMedian )
),
:Center_Median_BAPL << {Summary of Fit( 0 ), Analysis of Variance( 0 ), Parameter Estimates( 0 ),
Scaled Estimates( 0 ), EffectSummary( 0 ), Lack Of Fit( 0 ), Effect Tests( 0 ), Prediction Profiler( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ), Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 ), Show VIF( 0 )}
),
Local Data Filter(
Add Filter( columns( :Boule_Position ), Where( :Boule_Position >= 0.5992 & :Boule_Position <= 0.82 ) )
),
SendToReport(
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"1",
ScaleBox,
{Min( 0.5992 ), Max( 0.82 ), Inc( 0.02 ), Minor Ticks( 0 ), Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"2",
ScaleBox,
{Min( 908 ), Max( 925 ), Inc( 1 ), Minor Ticks( 0 ), Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{"Response Center_Median_BAPL", "Contour Profiler"},
"Contour Profiler Frame",
FrameBox,
{Frame Size( 513, 467 ), DispatchSeg( Contour Seg( 4 ), {Line Color( "None" ), Fill Color( {212, 73, 88} )} )}
)
)
)
)
),
Expr( __ListID__ ), ListID[i]
)
);
);