Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Come argomento.
Normalmente in JSL indichiamo i batch (rappresentati da una determinata colonna) per i quali presentiamo i punti sulla carta di controllo come segue:
Local Data Filter(
Close Outline( 1 ),
Add Filter(
columns( :Batch ),
Where(
:Batch == {"01/10/2022", "01/11/2022", "01/12/2022", "01/13/2022"}
),
Display( :Batch, N Items( 15 ), Find( Set Text( "" ) ) )
)
), Tuttavia, come possiamo richiedere che tutti i batch vengano presi in considerazione, tranne quelli per i quali abbiamo N/A (campo vuoto nella tabella dati) per un dato parametro?
Versione di JMP: 16.
Automazione e scriptingRi: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Un modo potrebbe essere quello di utilizzare un array associativo per ottenere tutti i valori univoci, quindi mantenere solo i valori non mancanti. Quindi, potresti passarlo come elenco al filtro dati locale. Esempio di seguito:
Names Default To Here (1);
//open file and delete a few data points
dt = open ("$SAMPLE_DATA/Abrasion.jmp");
for each ({i}, 6::9,
:Date[i] = .
);
//get non-missing
lstdates = matrix (Associative Array (:Date) << Get Keys);
lstdates = as list(lstdates[loc(!Is Missing(lstdates))]);
//launch cc
cc = Control Chart Builder( Variables( Y( :Abrasion ) ), Show Control Panel( 0 ), );
//launch data filter
ldf = cc << Local Data Filter(
Add Filter(
columns( :Date ),
Where( :Date == lstdates ),
Display( :Date, N Items( 5 ) )
)
);
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Sono un grande fan dell'utilizzo delle colonne di trasformazione direttamente all'interno delle piattaforme.Ecco come ho creato la parte del grafico di controllo dello script seguente:
- Crea il grafico di controllo utilizzando tutti i dati
- Nel pannello di controllo, fai clic con il pulsante destro del mouse su Data e scegli Formula
- Le funzioni Aggiungi mancante e Not quindi la formula è vera quando la colonna Data non manca e chiude la finestra di dialogo
- Fare clic con il tasto destro sulla nuova colonna e rinominarla in "HasDate"
- Fare clic con il tasto destro sul triangolo blu accanto alla nuova colonna e modificarlo in un tipo di dati Nominale
- Aggiungi un filtro dati locale, la colonna trasformata verrà automaticamente visualizzata nell'elenco delle colonne disponibili
Ecco cosa dovresti ottenere:

Ed ecco lo script per ricrearlo:
Names Default To Here (1);
dt = open ("$SAMPLE_DATA/Abrasion.jmp");
dt << Control Chart Builder(
Transform Column( "HasDate", Nominal, Formula( !Is Missing( :Date ) ) ),
Variables( Y( :Abrasion ) ),
Show Control Panel( 0 ),
Local Data Filter( Add Filter( columns( :HasDate ), Where( :HasDate == 1 ) ) )
);
Se dopo aver deciso che è una colonna utile per creare un oggetto visivo o eseguire un'analisi, puoi fare clic con il pulsante destro del mouse su di essa e aggiungerla alla tabella dati.
Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Molto bello, @ih !
Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Grazie. Penso che la tua risposta sia vicina a ciò che desidero e solo una leggera modifica del codice mi consentirebbe di ottenere il risultato desiderato. Purtroppo sono all'inizio del mio percorso con JMP SL, vi sarei grato se poteste aiutarmi ad ottenere un codice che implementi pienamente ciò che voglio ottenere. Cercherò quindi di spiegare meglio il mio problema.
Devo dire che utilizzo un ciclo per desiderare che le carte di controllo vengano eseguite per parametri diversi dalla tabella dati.Ho problemi con come, utilizzando il tuo suggerimento precedente, posso modificare il codice per prendere la i-esima colonna come quella su cui filtrare. Ho provato:Column(i), ma non credo che sia il modo...
Condivido un pezzo di codice dal mio tentativo di spiegare cosa intendo.
For( i = 2, i <= 5, i++,
dt << Control Chart Builder(
lstdates = Matrix( Associative Array( :Column( i ) ) << Get Keys );
lstdates = As List( lstdates[Loc( !Is Missing( lstdates ) )] );
Show Two Shewhart Charts( 0 );,
Sort by Row Order( 1 ),
Include Missing Categories( 0 ),
Show Excluded Region( 0 ), //sprawdź które to które
Show Limit Summaries( 0 ),
Variables( Subgroup( :Batch ), Y( :Column( i ) ) ),
Chart(
Points( Statistic( "Individual" ) ),
Limits( Sigma( "Levey Jennings" ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ) )
),
ldf = cc << Local Data Filter(
Add Filter( columns( :Column( i ) ), Where( :Column( i ) == lstdates ), Display( :Column( i ), N Items( 5 ) ) )
),
SendToReport(
Dispatch( {}, "graph display 1 title", TextEditBox, {Set Text( "Levey Jennings chart of " || Nazwy[i] )} ),
Dispatch( {}, "Subgroup display 1 title", TextEditBox, {Set Text( "Batch numer" )} )
)
);
)
);
Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Non sai forse cosa dovrei scrivere invece: Date, se userò il loop "for" per ogni parametro continuo nella mia tabella dati?
Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Questo esempio dovrebbe mostrarti come inserire tutte le colonne continue in un elenco e quindi scorrere tali colonne. Per inciso, se stai esaminando più colonne, hai considerato il grafico di controllo multivariato basato sul modello o la piattaforma di screening dei processi? Entrambi eccellono nello snellimento delle carte di controllo per più output.
Names Default To Here( 1 );
//open sample data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
//get all numeric continuous colums, return list as strings
lstcols = dt << Get Column Names( Numeric, Continuous, String );
//run an analysis for each column in the list
For Each( {i}, lstcols,
dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :age ), Y( Column( i ) ) ), //Use each column
Elements( Points( X, Y, Legend( 3 ) ) )
)
);
/*JMP STATISTICAL DISCOVERY LLC (“JMP”) PERMITS THE USE OF THIS COMPUTER SOFTWARE CODE (“CODE”) ON AN AS-IS BASIS AND AUTHORIZES YOU TO USE THE CODE SUBJECT TO THE TERMS LISTED HEREIN. BY USING THE CODE, YOU AGREE TO THESE TERMS. YOUR USE OF THE CODE IS AT YOUR OWN RISK. JMP MAKES NO REPRESENTATION OR WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRIGEMENT, AND TITLE, WITH RESPECT TO THE CODE.
You may use the Code solely as part of a software product you currently have licensed from JMP, JMP’s parent company SAS Institute Inc. (“SAS”), or one of JMP’s or SAS’s subsidiaries or authorized agents (the “Software”), and not for any other purpose. The Code is designed to add functionality to the Software but has not necessarily been tested. Accordingly, JMP makes no representation or warranty that the Code will operate error-free. JMP is under no obligation to maintain, support, or continue to distribute the Code.
Neither JMP nor its licensors shall be liable to you or any third-party for any general, special, direct, indirect, consequential, incidental, or other damages whatsoever arising out of or related to your use or inability to use the Code, even if JMP has been advised of the possibility of such damages. Except as otherwise provided above, the Code is governed by the same agreement that governs the Software. If you do not have an existing agreement with JMP or SAS governing the Software, you may not use the Code.
JMP and all other JMP Statistical Discovery LLC product or service names are registered trademarks or trademarks of JMP Statistical Discovery LLC in the USA and other countries. ® indicates USA registration. Other brand and product names are registered trademarks or trademarks of their respective companies.
*/Ri: Impostazione tramite JSL in modo che il grafico di controllo non visualizzi i batch per i quali mancano dati per un determinato parametro.Penso che quello che non capisco è perché fare riferimento a una determinata colonna con il suo nome (ad esempio ":name") funzionerebbe nel mio script ma con "column(i)" non funziona (lo so nel codice sopra ho commesso un errore scrivendo :column(i ), invece di column(i), ma correggendolo non è cambiato nulla...)