Skripterstellung für ein Gauge R&R-ProblemDas folgende JMP-Skript gilt für das Messgerät R&R 5 Sigma
Aber in meiner Variabilitätstabelle habe ich immer ein erstes Element gefunden, das erfolgreich auf dem Messgerät RR 5 Sigma eingerichtet werden kann.
Ich verstehe nicht, warum ich nicht alle Elemente der „Y-Liste“ auf 5 Sigma bekommen kann.
Kann mir jemand helfen?
rezults <SPAN class="token operator">=</SPAN> <SPAN class="token function">Column Dialog</SPAN><SPAN class="token punctuation">(</SPAN>
title<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Select Columns For Gauge R&R Analysis"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
yycol <SPAN class="token operator">=</SPAN> ColList<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Y, Response"</SPAN><SPAN class="token punctuation">,</SPAN> Mincol<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">1</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN> DataType<SPAN class="token punctuation">(</SPAN> Numeric <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
xxcol <SPAN class="token operator">=</SPAN> ColList<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"X, Factor"</SPAN><SPAN class="token punctuation">,</SPAN> Mincol<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">1</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN> Modeling <SPAN class="token function">Type</SPAN><SPAN class="token punctuation">(</SPAN> Nominal <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
bbycol <SPAN class="token operator">=</SPAN> ColList<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"By"</SPAN> <SPAN class="token punctuation">)</SPAN>
<SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
ylist <SPAN class="token operator">=</SPAN> rezults<SPAN class="token punctuation">[</SPAN><SPAN class="token string">"yycol"</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token punctuation">;</SPAN>
xlist <SPAN class="token operator">=</SPAN> rezults<SPAN class="token punctuation">[</SPAN><SPAN class="token string">"xxcol"</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token punctuation">;</SPAN>
bbylist <SPAN class="token operator">=</SPAN> rezults<SPAN class="token punctuation">[</SPAN><SPAN class="token string">"bbycol"</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token punctuation">;</SPAN>
N <SPAN class="token operator">=</SPAN> <SPAN class="token function">N Items</SPAN><SPAN class="token punctuation">(</SPAN> ylist <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
<SPAN class="token function">For</SPAN><SPAN class="token punctuation">(</SPAN> i <SPAN class="token operator">=</SPAN> <SPAN class="token number">1</SPAN><SPAN class="token punctuation">,</SPAN> i <SPAN class="token operator"><=</SPAN> N<SPAN class="token punctuation">,</SPAN> i<SPAN class="token operator">++</SPAN><SPAN class="token punctuation">,</SPAN>
s <SPAN class="token operator">=</SPAN> dt <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Get Property</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Spec Limits"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
usl <SPAN class="token operator">=</SPAN> s<SPAN class="token punctuation">[</SPAN><SPAN class="token string">"USL"</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token punctuation">;</SPAN>
lsl <SPAN class="token operator">=</SPAN> s<SPAN class="token punctuation">[</SPAN><SPAN class="token string">"LSL"</SPAN><SPAN class="token punctuation">]</SPAN><SPAN class="token punctuation">;</SPAN>
<SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
obj <SPAN class="token operator">=</SPAN> Variability Chart<SPAN class="token punctuation">(</SPAN>
Y<SPAN class="token punctuation">(</SPAN> <SPAN class="token function">Eval</SPAN><SPAN class="token punctuation">(</SPAN> ylist <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
X<SPAN class="token punctuation">(</SPAN> <SPAN class="token function">Eval</SPAN><SPAN class="token punctuation">(</SPAN> xlist <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
By<SPAN class="token punctuation">(</SPAN> <SPAN class="token function">Eval</SPAN><SPAN class="token punctuation">(</SPAN> bbylist <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Model<SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Main Effect"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Max Iter<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">100</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Conv Limit<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">0.00000001</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Number Integration Abscissas<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">128</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Number Function Evals<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">65536</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Analysis <SPAN class="token function">Type</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Choose best analysis (EMS REML)"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Historical <SPAN class="token function">Mean</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token number">0</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
Historical Sigma<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">0</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
<SPAN class="token comment">//Process Variation( 0 ),</SPAN>
Std Dev Chart<SPAN class="token punctuation">(</SPAN> <SPAN class="token number">0</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">,</SPAN>
<SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
obj <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Gauge RR</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token number">5</SPAN><SPAN class="token punctuation">,</SPAN> usl <SPAN class="token operator">-</SPAN> lsl<SPAN class="token punctuation">,</SPAN> lsl<SPAN class="token punctuation">,</SPAN> usl <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
Betreff: Skripterstellung für ein Gauge R&R-ProblemErstaunlich und es funktioniert.
Danke fürs Teilen.
Betreff: Skripterstellung für ein Gauge R&R-ProblemIgnorieren Sie die Originalversion dieser Antwort. Ich werde mich für die Ausrede „Es war vor meinem Morgenkaffee“ entscheiden.
Versuche dies.Ein paar Korrekturen. Die Werte „s“, „lsl“ und „usl“ wurden in früheren Beiträgen nicht in einer Liste gespeichert, sodass die Werte veraltet waren. hier behoben. Ich habe versehentlich „N“ als Iterationsparameter anstelle von i verwendet. Hier behoben. Überprüfen Sie auf jeden Fall noch einmal, ob dies Ihren Wünschen entspricht.
//clear log();
namespace("here")<<REMOVE></REMOVE>
Betreff: Skripterstellung für ein Gauge R&R-ProblemDanke für deine Antwort,
Aber ich stoße hier immer noch auf ein Problem
Nachdem ich das Skript ausgeführt hatte, bekam ich dann ein Variabilitätsmessgerät-Diagramm
1. Element auf Messgerät R&R = > kann 5K im VC-Diagramm anzeigen. das ist richtig
aber 2. Element im Messgerät R&R-Ergebnis => es zeigt „6K“ im VC-Diagramm.
Ich möchte, dass alle Artikel Ihrer Liste 5K in der Spur R&R berechnet werden
@mikedriscoll Haben Sie hier eine bessere Idee?
Betreff: Skripterstellung für ein Gauge R&R-ProblemHier ist die Neufassung. Wenn es keinen anderen Grund gibt, erleichtert die Rückruffunktion das Debuggen.
Bearbeiten: Verwenden Sie diese Version nicht. Es gibt Probleme damit, dass die Variablen s, lsl und usl veraltet sind, und das Problem des OP wird dadurch auch nicht behoben.
//clear log();
namespace("here")<<remove(namespace("here")<<getkeys);
names default to here(1);
dt = current data table();
showErrorMsg = expr(New Window("Must select at least one column...",<<Modal, textBox("Must select at least one column in Y and X roles. "),
ButtonBox("OK")));
//grrFunction = Function({ylist, xlist, bbylist}, // pass GUI variables to locals here, downside is can't hover to observe values
grrFunction = Function({x}, // x not used here, just using the variables from the GUI and re-assinging to existing vars
ylist = yParamNames;
xlist = xParamNames;
bbylist = byParamNames;
N = N Items( ylist );
For( i = 1, i <= N, i++,
s = column(dt, ylist[i]) << Get Property( "Spec Limits" );
usl = s["USL"];
lsl = s["LSL"];
);
obj = Variability Chart(
Y( Eval( ylist ) ),
X( Eval( xlist ) ),
By( Eval( bbylist ) ),
Model( "Main Effect" ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML)" ),
Historical Mean( 0 ),
Historical Sigma( 0 ),
//Process Variation( 0 ),
Std Dev Chart( 0 ),
);
obj << Gauge RR( 5, usl - lsl, lsl, usl );
);
nw = new window("Select Columns For Gauge R&R Analysis",
hlistbox( // horizontal list box
cflObj = filter col selector(data table(dt << get name()), nlines(20)), //first item in hlist box
panelbox( "Cast selected columns into roles", // second item
lineupbox(ncol(2),
bb_y = buttonbox("Y, Response",
newParams = cflObj << get selected;
yColObj << append(newParams);
),
yColObj = col list box(data table(dt << get name()),numeric,nlines(5), min items(1)),
bb_x = buttonbox("X, Factor",
newParams = cflObj << get selected;
xColObj << append(newParams);
),
xColObj = col list box(data table(dt << get name()),nlines(3), min items(1), <<Set Analysis Type(Nominal)),
bb_by = buttonbox("By",
newParams = cflObj << get selected;
byColObj << append(newParams);
),
byColObj = col list box(data table(dt << get name()),nlines(3))
)// end lineupbox
)// end roles panel box
,
panelbox("Actions", // final item
vlistbox(
button box("Ok",
yParamNames = yColObj << get items;
xParamNames = xColObj << get items;
byParamNames = byColObj << get items;
if ( nitems(yParamNames) == 0 | nitems(xParamNames) == 0 ,
showErrorMsg
,
//else
new namespace("recall_grr");
recall_grr:yParamNames_rcl = yColObj << get items;
recall_grr:xParamNames_rcl = xColObj << get items;
recall_grr:byParamNames_rcl = byColObj << get items;
nw << close window;
//grrFunction(yParamNames, xParamNames, byParamNames) //pass to local
grrFunction(1) // use these 3 (above) vars directly without passing
);
),
button box("Remove", yColObj << remove selected; xColObj << remove selected; byColObj << remove selected),
button box("Cancel", nw << close window),
spacerbox(Size(1,80)),
button box("Recall",
try(yColObj << append(recall_grr:yParamNames_rcl));
try(xColObj << append(recall_grr:xParamNames_rcl));
try(byColObj << append(recall_grr:byParamNames_rcl));
)
)
)//end actions panel box
) // end hlistbox
);//end new window nw
Betreff: Skripterstellung für ein Gauge R&R-ProblemSie hatten dt nicht definiert, aber ich gehe davon aus, dass Sie es separat definiert haben. Aber trotzdem haben Sie diesen Befehl in der Schleife verwendet:
s <SPAN class="token operator">=</SPAN> dt <SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Get Property</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token string">"Spec Limits"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
Dies funktioniert nicht (vorausgesetzt, dt ist eine Datentabelle), da die Spezifikationsgrenzen eine Eigenschaft einer Spalte und nicht der Datentabelle sind. Nachfolgend erfahren Sie, wie Sie auf die Spalte verweisen und auf die Eigenschaft „Spezifikationsgrenzen“ zugreifen. Ich habe eine Zeile dt = current data table() hinzugefügt.
Außerdem ist der Befehl „column dialog()“ veraltet (glaube ich) und wird durch den neuen Befehl „window()“ ersetzt, der eine ganze Reihe von Anzeigefeldern verwendet, darunter „filter col selector()“, „col list box()“ und „ Schaltflächenfeld()". Wenn Sie gerade erst anfangen, könnten Sie über einen Wechsel nachdenken. Es liegt an Ihnen, aber denken Sie einfach über einen Wechsel nach, anstatt viele Skripte mit veralteten Funktionen zu erstellen.
dt = current data table();
rezults = Column Dialog(
title( "Select Columns For Gauge R&R Analysis" ),
yycol = ColList( "Y, Response", Mincol( 1 ), DataType( Numeric ) ),
xxcol = ColList( "X, Factor", Mincol( 1 ), Modeling Type( Nominal ) ),
bbycol = ColList( "By" )
);
ylist = rezults["yycol"];
xlist = rezults["xxcol"];
bbylist = rezults["bbycol"];
N = N Items( ylist );
For( i = 1, i <= N, i++,
s = column(dt, ylist[N]) << Get Property( "Spec Limits" );
usl = s["USL"];
lsl = s["LSL"];
);
obj = Variability Chart(
Y( Eval( ylist ) ),
X( Eval( xlist ) ),
By( Eval( bbylist ) ),
Model( "Main Effect" ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( "Choose best analysis (EMS REML)" ),
Historical Mean( 0 ),
Historical Sigma( 0 ),
//Process Variation( 0 ),
Std Dev Chart( 0 ),
);
obj << Gauge RR( 5, usl - lsl, lsl, usl );