やあ、
スクリプトの何が問題なのかわかりません。 PQA(カテゴリ変数)のユーザー入力値を取得し、サブセットデータセットを使用して各PQAのカスタマイズされた一方向の結果を含む出力スクリプトを生成し、に保存されるスクリプトに読み込むために必要な情報を取得することになっています。元のデータテーブル。 たとえば、スクリプトのユーザー入力ウィンドウを使用しておもちゃのデータテーブルで次のJMPコードを実行すると、エラーメッセージが表示されます(下の図を参照)。
JMPコード:
/*
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 loopおもちゃのJMPデータセット:

JMPユーザー入力モーダルウィンドウ

JMPエラーメッセージ: "Name Unresolved:units_formatted in access or Evaluation of'units_fortmatted'、..."

たとえば、JMPがforループの各反復によって生成された各PQAサブセットデータセットlistDTの測定単位列を読み取らないのはなぜですか。PQA= Aの測定単位は「%」であり、のy軸ラベルに配置されます。スクリプトのようにチャート?
サンプルデータテーブルを添付できればとても助かります/
申し訳ありませんが、私に知らせてくれてありがとう! 添付ファイルとして元の投稿でそれを出すのを忘れています。