¿Cómo retrotransformar el valor transformado SHASH?Hola.
Estoy intentando calcular el CpK de los datos del proceso.
Independientemente de lo que diga el análisis histórico de Dist, se necesita una transformación SHASH.
Por lo tanto, aplico la transformación SHASH a los datos y los analizo.
Aquí están las preguntas.
1. ¿Puedo utilizar datos SHASH como material para Cpk?
2. ¿Necesito ingresar el valor SHASH del LSL/USL original en el análisis de Cpk?
3. ¿Cómo puedo transformar nuevamente el valor SHASH si se presenta mediante análisis?
4. ¿Hay alguna otra consideración para este tipo de análisis?
Gracias por leer.
Modelado estadístico avanzadoIngeniería de Calidad y ProcesosRe: ¿Cómo retrotransformar el valor transformado SHASH?He hecho esto en el pasado usando aproximaciones sucesivas para hacer la Transformación Inversa.A continuación se muestra un ejemplo muy burdo del uso de aproximaciones sucesivas en una columna.
names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Probe.jmp" );
// Save Columns: Save Transformed
Local( {obj},
obj = dt << Distribution(
Continuous Distribution( Column( :DELL_RPPBR ), Fit SHASH )
);
obj << (Fit Handle["SHASH"] << Save Transformed);
obj << Close Window;
);
meandell_rppbr = col mean(dt:dell_rppbr);
meanSHASH = col mean(dt:SHASH Transform to Normal dell_rppbr);
// Determine the mean of the SHASH value in the original data distribution
// Do this by using successive approximation
// Temporarily add a new row to have a cell to be able to run the SHASH formula
dt << add rows(1);
theRow = nrows(dt);
theMax = col max(:dell_rppbr);
theMin = col min(:dell_rppbr);
targetdell_rppbr = meandell_rppbr;
theDif = col max( dt:SHASH Transform to Normal dell_rppbr)-col min(dt:SHASH Transform to Normal dell_rppbr);
count = 1;
// Successively recalculate the SHASH formula until the difference
// between the mean of the SHASH calculated mean, and the estimated
// value is effectively zero.
while( round(theDif,5) != 0 & count < 100,
if(dt:SHASH Transform to Normal dell_rppbr[theRow]>meanSHASH,
theMax = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMin ),
theMin = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMax )
);
dt:dell_rppbr[theRow] = targetdell_rppbr;
count++;
dt << rerun formulas;
theDif = meanSHASH - dt:SHASH Transform to Normal dell_rppbr[theRow];
);
// Once the difference is effectively zero, then display the results
meanSHASHBackTransform = :dell_rppbr[theRow];
dt<<DELETE rows=""></DELETE>Re: ¿Cómo retrotransformar el valor transformado SHASH?Lamentablemente, no puedo comprender completamente el script ni los resultados de la ejecución.
Sin embargo, parece obvio que la retrotransformación de SHASH no es idéntica a la unidad original. (teniendo en cuenta el valor del resultado de la ejecución y su uso de "aproximación")
Por lo tanto, simplemente concluí que no puedo usar esta transformación, ya que se necesita una coincidencia exacta de 1 a 1 para este tipo de análisis de Cpk.
Un punto muy interesante pero confuso es que la transformación general como Log y Sqrt tiene la misma transformación inversa, pero este no parece ser el caso de SHASH y varios otros, como quizás Box-cox.
Una pregunta más, mientras investigaba, SHASH debe ser sinh(arcsinh(x)), entonces ¿por qué sinh(arcsinh(93))=93? este 93 es arbitrario pero f(x)=x, era mi intención. ¿Me equivoco?
Re: ¿Cómo retrotransformar el valor transformado SHASH?Hola TXnelson, ¿puedes agregar la desviación estándar para la transformación original, SHASH y inversa? ¡Muchas gracias!
Re: ¿Cómo retrotransformar el valor transformado SHASH?Su solicitud, si bien no es una modificación difícil del código, la interpretación no es sencilla.Para transformar hacia atrás la desviación estándar, uno tiene que transformar hacia atrás el valor de una desviación estándar transformada por encima de la media transformada y luego restar la media original, de la nueva transformación inversa 1 std por encima de la media.Esto es fácil de hacer, pero debido a que la transformación cambia la distribución de los datos, es necesario repetir el mismo proceso con el valor transformado, uno transformado estándar, por debajo de la media.El resultado es que la distancia desde la media hasta el valor retrotransformado por encima de la media es diferente de la distancia desde la media hasta el valor retrotransformado por debajo de la media.En el ejemplo de mi respuesta anterior, la distancia desde la media hasta el valor transformado hacia atrás es: 1,57, donde la distancia por debajo de la media es 0,303. ¿No sé cómo lidiar con estas diferencias?
Re: ¿Cómo retrotransformar el valor transformado SHASH?Gracias Jim por tu rápida respuesta. Usando su código pude volver a transformar mi conjunto de datos en media, pero soy nuevo en JMP y no sé cómo se vería el código. ¿Pueden ayudarme? gracias
Media original: 4,92759
SHASH Media: 0284
Media transformada hacia atrás: 5,14013
Estándar original: 0,6796304
SHASH Stdv: 1.0157
Re: ¿Cómo retrotransformar el valor transformado SHASH?Como dije anteriormente, no habrá un valor único para la STD retrotransformada.Se debe suponer que si se transforman los datos, los datos originales, no transformados, no se distribuyen normalmente.Por lo tanto, el punto de desviación estándar retrotransformado de 1 STD por encima de la media original no estará a la misma distancia de la media, como lo estará 1 STD por debajo de la media.Entonces, la mejor manera de mostrar esto es devolver el v1STD por encima de la media y el 2 STD por debajo de la media.Aquí está el JSL para calcular todo esto.
names default to here(1);
dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Probe.jmp" );
// Save Columns: Save Transformed
Local( {obj},
obj = dt << Distribution(
Continuous Distribution( Column( :DELL_RPPBR ), Fit SHASH )
);
obj << (Fit Handle["SHASH"] << Save Transformed);
obj << Close Window;
);
meandell_rppbr = col mean(dt:dell_rppbr);
meanSHASH = col mean(dt:SHASH Transform to Normal dell_rppbr);
// Determine the mean of the SHASH value in the original data distribution
// Do this by using successive approximation
// Temporarily add a new row to have a cell to be able to run the SHASH formula
dt << add rows(1);
theRow = nrows(dt);
theMax = col max(:dell_rppbr);
theMin = col min(:dell_rppbr);
targetdell_rppbr = meandell_rppbr;
theDif = col max( dt:SHASH Transform to Normal dell_rppbr)-col min(dt:SHASH Transform to Normal dell_rppbr);
count = 1;
// Successively recalculate the SHASH formula until the difference
// between the mean of the SHASH calculated mean, and the estimated
// value is effectively zero.
while( round(theDif,5) != 0 & count < 100,
if(dt:SHASH Transform to Normal dell_rppbr[theRow]>meanSHASH,
theMax = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMin ),
theMin = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMax )
);
dt:dell_rppbr[theRow] = targetdell_rppbr;
count++;
dt << rerun formulas;
theDif = meanSHASH - dt:SHASH Transform to Normal dell_rppbr[theRow];
);
// Once the difference is effectively zero, then display the results
meanSHASHBackTransform = :dell_rppbr[theRow];
displayList = {};
insert into(displayList, meandell_rppbr);
insert into(displayList, meanSHASH);
insert into(displayList, meanSHASHBackTransform);
sourceList = {"Original Mean", "SHASH Mean", "Back Transformed Mean"};
meandell_rppbr = col mean(dt:dell_rppbr);
stddell_rppbr = col STDDEV(dt:dell_rppbr);
upperSTDSHASH = col mean(dt:SHASH Transform to Normal dell_rppbr)+col STDDEV(dt:SHASH Transform to Normal dell_rppbr);
// Calculate the Upper STD
// Determine the mean of the SHASH value in the original data distribution
// Do this by using successive approximation
STDSHASH = col mean(dt:SHASH Transform to Normal dell_rppbr) +
col STDDEV(dt:SHASH Transform to Normal dell_rppbr);
theMax = col max(:dell_rppbr);
theMin = col min(:dell_rppbr);
targetdell_rppbr = meandell_rppbr;
theDif = col max( dt:SHASH Transform to Normal dell_rppbr)-col min(dt:SHASH Transform to Normal dell_rppbr);
count = 1;
// Successively recalculate the SHASH formula until the difference
// between the mean of the SHASH calculated mean, and the estimated
// value is effectively zero.
while( round(theDif,5) != 0 & count < 100,
if(dt:SHASH Transform to Normal dell_rppbr[theRow]>upperSTDSHASH,
theMax = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMin ),
theMin = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMax )
);
dt:dell_rppbr[theRow] = targetdell_rppbr;
count++;
dt << rerun formulas;
theDif = upperSTDSHASH - dt:SHASH Transform to Normal dell_rppbr[theRow];
);
// Once the difference is effectively zero, then display the results
UpperSTDSHASHBackTransform = :dell_rppbr[theRow] - meandell_rppbr;
insert into(displayList, stddell_rppbr);
insert into(displayList, upperSTDSHASH);
insert into(displayList, UpperSTDSHASHBackTransform);
insert into(sourceList,"Original STD" );
insert into(sourceList,"SHASH STD");
insert into(sourceList,"Back Transformed Upper STD");
// Calculate the Lower STD
// Determine the mean of the SHASH value in the original data distribution
// Do this by using successive approximation
STDSHASH = col mean(dt:SHASH Transform to Normal dell_rppbr) -
col STDDEV(dt:SHASH Transform to Normal dell_rppbr);
theMax = col max(:dell_rppbr);
theMin = col min(:dell_rppbr);
targetdell_rppbr = meandell_rppbr;
theDif = col max( dt:SHASH Transform to Normal dell_rppbr)-col min(dt:SHASH Transform to Normal dell_rppbr);
count = 1;
// Successively recalculate the SHASH formula until the difference
// between the mean of the SHASH calculated mean, and the estimated
// value is effectively zero.
while( round(theDif,5) != 0 & count < 100,
if(dt:SHASH Transform to Normal dell_rppbr[theRow]>upperSTDSHASH,
theMax = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMin ),
theMin = targetdell_rppbr;
targetdell_rppbr = mean(targetdell_rppbr, theMax )
);
dt:dell_rppbr[theRow] = targetdell_rppbr;
count++;
dt << rerun formulas;
theDif = upperSTDSHASH - dt:SHASH Transform to Normal dell_rppbr[theRow];
);
// Once the difference is effectively zero, then display the results
UpperSTDSHASHBackTransform = meandell_rppbr - :dell_rppbr[theRow];
insert into(displayList, UpperSTDSHASHBackTransform);
insert into(sourceList,"Back Transformed Lower STD");
New Window("Results",
Table Box(
string col box("Source", sourceList),
number col box("Value", displayList)
)
);
dt<<DELETE rows=""></DELETE>Re: ¿Cómo retrotransformar el valor transformado SHASH?Hola Jim. Muchas gracias por tu explicación. Ahora tiene sentido para mí. Además, ¡gracias por proporcionar el código actualizado!