Configuración mediante JSL para que el gráfico de control no muestre lotes para los que faltan datos para un parámetro determinado.Como el tema.
Normalmente en JSL indicamos lotes (representados por una columna determinada) para los cuales presentamos puntos en el gráfico de control de la siguiente manera:
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( "" ) ) )
)
), Sin embargo, ¿cómo podemos solicitar que se tengan en cuenta todos los lotes, excepto aquellos para los que tenemos N/A (campo vacío en la tabla de datos) para un determinado parámetro?
Versión de JMP: 16.
Automatización y secuencias de comandosRe: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Una forma sería utilizar una matriz asociativa para obtener todos los valores únicos y luego conservar solo los valores que no faltan. Luego, podría pasar esto como una lista al filtro de datos local. Ejemplo a continuación:
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.
*/Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Soy un gran admirador del uso de columnas de transformación dentro de las plataformas.Así es como creé la parte del gráfico de control del siguiente script:
- Cree el gráfico de control utilizando todos los datos.
- En el panel de control, haga clic derecho en Fecha y elija Fórmula
- Agregar falta y no funciona para que la fórmula sea verdadera cuando no falta la columna Fecha y cierre el cuadro de diálogo
- Haga clic derecho en la nueva columna y cámbiele el nombre a 'HasDate'
- Haga clic derecho en el triángulo azul al lado de la nueva columna y cámbiela a un tipo de datos nominal
- Agregue un filtro de datos local, la columna transformada aparecerá automáticamente en la lista de columnas disponibles
Esto es lo que deberías obtener:

Y aquí está el script para recrearlo:
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 ) ) )
);
Si después de decidir que es una columna útil para crear un objeto visual o realizar un análisis, puede hacer clic derecho sobre ella y agregarla a la tabla de datos.
Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Muy lindo, @ih !
Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Gracias. Creo que tu respuesta se acerca a lo que quiero y solo una ligera modificación del código me permitiría lograr el resultado deseado. Desafortunadamente, estoy al comienzo de mi viaje con JMP SL, le agradecería si pudiera ayudarme a obtener un código que implementara completamente lo que quiero lograr. Por lo tanto, intentaré explicar mejor mi problema.
Debo decir que uso un bucle para querer que se ejecuten gráficos de control para diferentes parámetros de la tabla de datos.Tengo problemas con cómo, usando su consejo anterior, puedo cambiar el código para tomar la columna i-ésima como la que se debe filtrar. Lo intenté: Columna (i), pero no creo que sea la forma...
Estoy compartiendo un fragmento de código de mi intento de explicar lo que quiero decir.
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" )} )
)
);
)
);
Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.¿No sabes qué debería escribir en su lugar: Fecha, si voy a usar el bucle "for" para cada parámetro continuo en mi tabla de datos?
Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Este ejemplo debería mostrarle cómo incluir todas las columnas continuas en una lista y luego recorrer esas columnas. Por cierto, si está mirando varias columnas, ¿ha considerado el gráfico de control multivariado basado en modelo o la plataforma de detección de procesos? Ambos destacan por optimizar los gráficos de control para múltiples resultados.
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.
*/Re: Configurar el uso de JSL para que el gráfico de control no muestre lotes para los cuales faltan datos para un parámetro determinado.Creo que lo que no entiendo es por qué hacer referencia a una columna dada por su nombre (por ejemplo ':nombre') funcionaría en mi script pero por 'columna(i)' no funciona (lo sé en el código arriba cometí un error al escribir: columna(i), en lugar de columna(i), pero corregirlo no cambió nada...)