Hi,
Ich bin mir nicht sicher, was mit meinem Skript falsch ist. Es soll die Benutzereingabewerte von PQA (eine kategoriale Variable) nehmen und Ausgabeskripte erzeugen, die benutzerdefinierte One-Way-Ergebnisse für jede PQA enthalten, wobei ein Teildatensatz verwendet wird, um die Informationen zu erhalten, die zum Einlesen in die gespeicherten Skripts erforderlich sind die ursprüngliche Datentabelle. Wenn ich beispielsweise den folgenden JMP-Code auf der Spielzeugdatentabelle mit dem Benutzereingabefenster des Skripts ausführe, erhalte ich eine Fehlermeldung (siehe Abbildungen unten).
JMP-Code:
/*
Objective:
Get a JMP report with customized comparability model output,
given a data table with column names:
- batch name/lot number
- Mfg Group
- PQA
- result
- measurment units
- LSL
- USL
The comparability output will give the process charts and the
TOST results.
*/
/////////////////////////////////////////////////////////////
//User Selection Menu(s)
/////////////////////////////////////////////////////////////
//select the data in the original data table
Names Default To Here( 1 );
dt = Current Data Table();
//get the unique PQAs
col9 = Column(dt, "PQA");
unique_pqa = Associative Array( col9 ) << get keys;
//Part 2: Select PQA(s) and invisibility option.
invisible_window_options = {"invisible", "visible"};
nw2 = New Window("Select PQAs",
<<MODAL></MODAL> variablebox1_pqa << Set All(this << Get, run script(1))))),
Text Box("Select All PQAs", <<SET width=""></SET> Is String(units), " (" || units || ") ");
//get the spec limits
lslval = :LSL[1];
uslval = :USL[1];
lpcrval = :Name("Lower_PCR")[1];
upcrval = :Name("Upper_PCR")[1];
//TO DO: write in the max_val and min_val from stability script to
//set the significance level based on the number of spec limits present
alpha_level_a = If(!Is Missing(lslval) & !Is Missing(uslval), 0.1, 0.2);
dt << New Script (
"JMP report results for " || pqa_val,
//TO DO: Wrap process chart and TOST results into an initalized window
//Process Chart
Oneway(
//SendToByGroup( {:PQA == Expr(pqa_val)},
//Y( :Result ) ),
Y( :Result N ),
X( :Name("Batch Name") ),
Connect Means( 1 ),
Grand Mean( 0 ),
//),
// SendToByGroup(
// {:PQA == pqa_val},
Where( :PQA == Expr(pqa_val) ),
SendToReport(
Dispatch(
{},
"Oneway Analysis of Result N By Batch Name",
OutlineBox,
{Set Title( "Oneway Analysis of " || Expr(pqa_val) || Expr(units_formatted) || " Result N By Batch Name")}
),
Dispatch(
{},
"Result N",
TextEditBox,
{Set Text( Expr(pqa_val) || Expr(units_formatted) )}
),
Dispatch(
{},
"2",
ScaleBox,
{Label Row( Set Font Size( 5 ) )}
),
Dispatch(
{},
"1",
ScaleBox,
{Min( Expr(lslval)*0.9 ), Max( Expr(uslval)*1.1 ), Inc( 1 ), Minor Ticks( 1 ),
Add Ref Line(
Expr(lslval),
"Solid",
"Dark Red",
"LSL (" || char(Expr(lslval)) || ")",
2
),
Add Ref Line(
Expr(uslval),
"Solid",
"Dark Red",
"USL (" || char(Expr(uslval)) || ")",
2
),
Add Ref Line(
Expr(lpcrval),
"Dashed",
"Dark Blue",
"Lower PCR Limit (" || char(Expr(lpcrval)) || ")",
2
),
Add Ref Line(
Expr(upcrval),
"Dashed",
"Dark Blue",
"Upper PCR Limit (" || char(Expr(upcrval)) || ")",
2
)
}
),
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Frame Size( 1000, 300 ), DispatchSeg(
CustomStreamSeg( 6 ),
{Line Color( "Gray" )}
), Row Legend(
Group,
Color( 0 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
//) //send to by group
); //Process chart Oneway
//TOST results
Oneway(
Y( :Result N ),
X( :Group ),
t Test( 1 ),
Set α Level( Expr(alpha_level_a) ),
Where( :PQA == Expr(pqa_val) ),
SendToReport(
Dispatch(
{},
"Oneway Analysis of Result N By Group",
OutlineBox,
{Set Title( "Oneway Analysis of " || Expr(pqa_val) || Expr(units_formatted) || " Result N By Group" )}
),
Dispatch(
{},
"Result N",
TextEditBox,
{Set Text( Expr(pqa_val) || Expr(units_formatted) )}
))
); //TOST oneway
); //dt new script
) //eval expression
); //eval
//); //content V List box
//append each output into the initialized nw window above.
//container << Append(content);
); //for loopToy JMP-Datensatz:

Modales JMP-Benutzereingabefenster

JMP-Fehlermeldung: "Name nicht aufgelöst: units_formatted im Zugriff oder Auswertung von 'units_fortmatted',..."

Warum liest JMP beispielsweise nicht die Spalte „Maßeinheiten“ aus jeder PQA-Teilmengen-DatensatzlisteDT, die von jeder Iteration der for-Schleife erzeugt wird, sodass die Maßeinheiten für PQA = A „%“ sind und auf der y-Achsenbeschriftung der Diagramm wie im Drehbuch?
Wenn Sie eine Beispieldatentabelle anhängen könnten, wäre dies sehr hilfreich.
Entschuldigung und danke für den Hinweis! Ich habe vergessen, es in meinem ursprünglichen Posting als Anhang zu veröffentlichen.