Estrazione degli output dopo aver massimizzato le funzioni di desiderabilitàSto eseguendo modelli di regressione (JMP15) su un set di dati "per gruppo", ovvero generando oltre 100 modelli di regressione dalla stessa tabella di dati. Quindi massimizzo la desiderabilità per tutti questi gruppi. Vorrei estrarre i valori variabili corrispondenti alla "massima desiderabilità" per ciascuno degli oltre 100 modelli (i valori cerchiati nell'immagine sotto). Qualche suggerimento su come farlo (JSL o l'utilizzo della GUI vanno bene)?

Posso farlo in modo noioso (Ctrl-Prediction Profiler -> Impostazioni fattore -> Ricorda impostazioni salva le impostazioni per ogni caso come "Impostazioni ricordate", che posso quindi estrarre con Ctrl-Crea tabella dati combinata. Tuttavia questo mi richiede per premere "invio" più di 100 volte corrispondenti a ciascun gruppo!).
Analisi e modellazione dei dati di baseRe: Estrazione degli output dopo aver massimizzato le funzioni di desiderabilitàEcco un esempio di come fare quello che vuoi. Nell'esempio viene creata una tabella di esempio. Quindi esegue il modello Stima. Dovrai massimizzare la desiderabilità e quindi eseguire il resto del codice per ottenere la nuova tabella di output

Names Default To Here( 1 );
dt =
// Open Data Table: Tiretread.jmp
// → Data Table( "Tiretread" )
Open( "$SAMPLE_DATA/Tiretread.jmp" );
dtSub = dt << subset( selected columns( 0 ), selected rows( 0 ), output table( "Subset" ) );
For Each Row(
:Abrasion = :Abrasion + :Abrasion*random normal(0,1);
:MODULUS = :MODULUS + :MODULUS*random normal(0,1);
:ELONG = :ELONG + :ELONG * random normal(0,1);
:HARDNESS = :HARDNESS + :HARDNESS* random normal(0,1);
);
dt << Concatenate(
dtSub,
Output Table( "Concat of Tiretread, Subset" ),
Append to first table,
Create source column
);
Close( dtSub, nosave );
// Run the Model
fm = Fit Model(
Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ),
By( :Source Table ),
Effects( :SILICA, :SILANE, :SULFUR ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:ABRASION << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:MODULUS << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:ELONG << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:HARDNESS << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 )
)
)
);
// Stop the JSL
stop();
// Set the Maximize Desirability and the run the code below
// Create an output table
dtMax = New Table( "Desirability",
New Column( "By Group", character ),
New Column( "Silica" ),
New Column( "Silane" ),
New Column( "Sulfer" )
);
// Populate the table getting the Desirability values from the chart
// In this example, the 2 by groups are actually just a replicate of the same
// data, so the output values will be the same.
For Each( {profile}, fm,
dtMax << add rows( 1 );
:By Group[N Rows( dtMax )] = Report( profile )[Outline Box( 1 )] << get title;
:Silica[N Rows( dtMax )] = Report( profile )["Prediction Profiler"][Number Edit Box( 1 )]
<< get;
:Silane[N Rows( dtMax )] = Report( profile )["Prediction Profiler"][Number Edit Box( 2 )]
<< get;
:Sulfer[N Rows( dtMax )] = Report( profile )["Prediction Profiler"][Number Edit Box( 3 )]
<< get;
);
Ri: Estrarre gli output dopo aver massimizzato le funzioni di desiderabilitàCiao Jim,
Grazie mille per il codice. Tuttavia restituisce un errore nell'ultima sezione (dopo aver eseguito l'adattamento dei minimi quadrati e dopo aver creato la tabella vuota "Desiderabilità") come segue:

Sto eseguendo JMP15.
Re: Estrazione degli output dopo aver massimizzato le funzioni di desiderabilitàInoltre, come posso salvare le risposte ottimizzate (ad esempio Abrasione, Modulo, Allungamento, Durezza) corrispondenti alle desiderabilità massimizzate nella stessa tabella?
Grazie.
Re: Estrazione degli output dopo aver massimizzato le funzioni di desiderabilitàLa funzione For Each() non è stata introdotta fino a JMP 16. Pertanto il codice deve essere modificato in una metodologia di ciclo For().
For( i=1,i<=nitems(fm), i++,
Ecco il JSL modificato per utilizzare la funzione For() e per leggere anche i valori ottimizzati per le variabili di risposta. Ho testato il codice in JMP 15
Names Default To Here( 1 );
dt =
// Open Data Table: Tiretread.jmp
// → Data Table( "Tiretread" )
Open( "$SAMPLE_DATA/Tiretread.jmp" );
dtSub = dt << subset( selected columns( 0 ), selected rows( 0 ), output table( "Subset" ) );
For Each Row(
:Abrasion = :Abrasion + :Abrasion*random normal(0,1);
:MODULUS = :MODULUS + :MODULUS*random normal(0,1);
:ELONG = :ELONG + :ELONG * random normal(0,1);
:HARDNESS = :HARDNESS + :HARDNESS* random normal(0,1);
);
dt << Concatenate(
dtSub,
Output Table( "Concat of Tiretread, Subset" ),
Append to first table,
Create source column
);
Close( dtSub, nosave );
// Run the Model
fm = Fit Model(
Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ),
By( :Source Table ),
Effects( :SILICA, :SILANE, :SULFUR ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:ABRASION << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:MODULUS << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:ELONG << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
:HARDNESS << {Summary of Fit( 1 ), Analysis of Variance( 1 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )},
Profiler(
1,
Confidence Intervals( 1 ),
Desirability Functions( 1 )
)
)
);
// Stop the JSL
stop();
// Set the Maximize Desirability and the run the code below
// Create an output table
dtMax = New Table( "Desirability",
New Column( "By Group", character ),
New Column( "Silica" ),
New Column( "Silane" ),
New Column( "Sulfer" ),
New Column( "Optimized Abrasion"),
New Column( "Optimized Modulus"),
New Column( "Optimized Elong"),
New Column( "Optimized Hardness")
);
// Populate the table getting the Desirability values from the chart
// In this example, the 2 by groups are actually just a replicate of the same
// data, so the output values will be the same.
For( i=1,i<=nitems(fm), i++,
dtMax << add rows( 1 );
:By Group[N Rows( dtMax )] = Report( fm[i] )[Outline Box( 1 )] << get title;
:Silica[N Rows( dtMax )] = Report( fm[i] )["Prediction Profiler"][Number Edit Box( 1 )]
<< get;
:Silane[N Rows( dtMax )] = Report( fm[i] )["Prediction Profiler"][Number Edit Box( 2 )]
<< get;
:Sulfer[N Rows( dtMax )] = Report( fm[i] )["Prediction Profiler"][Number Edit Box( 3 )]
<< get;
:Optimized Abrasion[N Rows( dtMax )] = Num(Report( fm[i] )["Prediction Profiler",TextBox(2)]
<<GET text=""></GET>
<P>Adesso arriva il tuo lavoro. Devi studiare il JSL fornito e imparare cosa sta facendo. Tagliare e incollare il codice senza capire cosa sta facendo non è una buona pratica. Si prega di prendersi il tempo necessario per conoscere le funzioni utilizzate, nonché l'output della struttura di visualizzazione e come interpretare e utilizzare i valori dalle visualizzazioni di output. Quando riscontri problemi di comprensione, torna alla community di discussione per ricevere assistenza.</P>
<P> </P>