Seleccione el rango medio del 90% usando cuantilesTengo una columna Continua numérica etiquetada como Altura con varios cientos de valores de altura. Quiero excluir los valores atípicos usando solo el rango de datos medio del 90%. Estoy tratando de escribirlo en JSL seleccionando todas las filas por debajo del 5% de cuantil y por encima del 95% de cuantil y luego excluirlas. Pero no puedo hacer que funcione usando el siguiente script. Agradeceré cualquier orientación.
RowsBelow5PCTL = dt << get rows where( :HEIGHT < Col Quantile( :HEIGHT, .05 ) );
RowsAbove95PCTL = dt << get rows where( :HEIGHT > Col Quantile( :HEIGHT, .95 ) );
ScriptingRe: seleccionar rango medio del 90% usando cuantilesCreo que esto te dará lo que quieres;
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << select where(
:HEIGHT < Col Quantile( :Height, .05 ) |
:HEIGHT > Col Quantile( :Height, .95 )
);
dt << exclude;
O si necesita tener sus matrices de números de fila arriba y abajo, entonces esto funcionará
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
RowsBelow5PCTL = dt << get rows where( :HEIGHT < Col Quantile( :HEIGHT, .05 ) );
dt << select rows(RowsBelow5PCTL);
RowsAbove95PCTL = dt << get rows where( :HEIGHT > Col Quantile( :HEIGHT, .95 ) );
dt << select rows(RowsAbove95PCTL);
dt << exclude;
Re: seleccionar rango medio del 90% usando cuantilesMuchas gracias.