LSMeans Differences Student's tからのデータの報告こんにちは、みんな、
LSMeans Differences Student's t の表から特定のデータを使用してレポートを作成しようとしています。

次のいずれかの形式のテーブルを希望します。


残念ながら、平均値を正しく印刷できず、大きなテーブルからデータを取得できません。以下のようになります。

私は次のコードを試しました。ここでは、「17」を 1 から 30 までの数字に変更しましたが、何も機能しません。17 は別のアウトライン ボックス用です。
sd = Open( "test_table.jmp" );<BR /><BR />Fitmod = Fit Model(<BR />Y( :"Test value"n ),<BR />Effects( :Person ),<BR />Random Effects( :Day[:Person] ),<BR />NoBounds( 0 ),<BR />Personality( "Standard Least Squares" ),<BR />Method( "REML" ),<BR />Emphasis( "Effect Leverage" ),<BR />Run(<BR />:"Test value"n << {Summary of Fit( 1 ),<BR />Analysis of Variance( 0 ), Parameter Estimates( 1 ), Scaled Estimates( 0 ),<BR />Plot Actual by Predicted( 1 ), Plot Regression( 0 ),<BR />Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),<BR />Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),<BR />{:Person << {LSMeans Student's t( 0.05 )}}}<BR />),<BR />Where( :ID == "A1" ),<BR />SendToReport(<BR />Dispatch(<BR />{"Test value ID=A1"},<BR />"Whole Model",<BR />OutlineBox,<BR />{Close( 1 )}<BR />),<BR />Dispatch(<BR />{"Test value ID=A1", "Person"},<BR />"Leverage Plot",<BR />OutlineBox,<BR />{Close( 1 )}<BR />)<BR />)<BR />);<BR /><BR />report(Fitmod) [Outline Box( 2 )] << Close( 0 );<BR />reportFitmod = Fitmod << Report;<BR /><BR /><STRONG>sumfit = reportFitmod[Outline Box( 17 )][Number Col Box( 1 )] << Get as Matrix;
meandiff = sumfit[1];
lowerCL = sumfit[3];
upperCL = sumfit[4];</STRONG><BR /><BR />term = reportFitmod[Outline Box( 13 )][String Col Box( 1 )] << Get();<BR /><BR />est = reportFitmod[Outline Box( 13 )][Number Col Box( 1 )] << Get as Matrix;<BR /><BR />dvalues = [];<BR />dvalues = meandiff |/ lowerCL |/ upperCL ;<BR />sfactor = term[2];<BR /><BR />dlg = New Window( "Custom Report",<BR />Outline Box( "Selected Values",<BR />Lineup Box( N Col( 2 ),<BR />Text Box( "Factor of Interest: " ),<BR />Text Box( sfactor ), ),<BR />tb = Table Box(<BR /><BR />String Col Box( " ",<BR />{"Mean difference: ", "Upper limit: ", "Lower limit: "}<BR />),<BR />Spacer Box( Size( 30, 30 ) ),<BR />,<BR />Spacer Box( Size( 0, 30 ) ),<BR />,<BR />Table Box(<BR />CloneTerm,<BR />Spacer Box( Size( 10, 0 ) ),<BR />,<BR />Number Col Box( "Estimate", est ),<BR />Spacer Box( Size( 10, 0 ) ),<BR />,<BR />Number Col Box( "Mean difference", meandiff)<BR />)<BR />)<BR />);<BR /><BR />tb << Set Shade Headings( 0 ); // Turn off shaded table headings.<BR />tb << Set Heading Column Borders( 0 ); // Turn off table column borders.<BR />
大きなテーブルからのデータをどのようにレポートしますか?
よろしくお願いします
自動化とスクリプトRe: LSMeans Differences Student's t からのデータの報告JMP コミュニティへようこそ。
添付したデータ テーブルとスクリプトが混同されていると思われます。スクリプト内の分析対象列への参照が、添付したデータ テーブル内の列と一致していません。
正しい添付ファイルを提供していただければ、コミュニティがあなたの取り組みを支援できると確信しています。
Re: LSMeans Differences Student's t からのデータの報告ジム様
混乱をお詫び申し上げます。お知らせいただきありがとうございます。正しいスクリプトを添付しました。
ジュリー
Re: LSMeans Differences Student's t からのデータの報告これにより、最終製品を手に入れるのに有利になるかもしれません。

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table" );
Fitmod = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ), Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ), Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == "A1" ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch( {"Test value ID=A1", "Person"}, "Leverage Plot", OutlineBox, {Close( 1 )} )
)
);
Report( Fitmod )[Outline Box( 2 )] << Close( 0 );
reportFitmod = Fitmod << Report;
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] << get as matrix;
// Get Where clause variable
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
whereVal = {};
Eval( Parse( "insert into(whereVal," || Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, "=)" ) || ");" ) );
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
est = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
testValue = {};
Insert Into( testValue, (Substr( reportFitmod[Outline Box( 1 )] << get title, 10 )) );
dif = {};
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( sfactor ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, whereVal ),
Number Col Box( "Mean, " || term[1], sumfit[1] ),
Number Col Box( "Mean, " || term[2], sumfit[2] ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
Re: LSMeans Differences Student's t からのデータの報告こんにちは、ジムさん
さまざまな要素をすべて含むテーブルを生成するために複数の ID がある場合、スクリプトをどのように変更すればよいでしょうか? これにはループを実装できますか?
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告複数レベルの ID を処理できるように JSL を変更しました。

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table " );
Fitmod = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ), Parameter Estimates( 1 ),
Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
by( :ID ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch( {"Test value ID=A1", "Person"}, "Leverage Plot", OutlineBox, {Close( 1 )} )
)
);
// Set the lists for the storage of the data from the by groups
whereVal = testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 1, (reportFitmod[Outline Box( 1 )] << get title), "=)" );
Insert Into( whereVal, Word( 2, (reportFitmod[Outline Box( 1 )] << get title), "=)" ) );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] <<
get as matrix;
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Differeence in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, whereVal ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
ここでのあなたの仕事は、スクリプトを研究し、それが何を行うかを学ぶことです。スクリプトは、指定したサンプル データ テーブルと適合モデルで機能します。ただし、異なる列を持つ異なるデータ テーブルと異なる適合モデル実行は、レポート出力を生成する JSL では機能しない可能性があります。ニーズに合わせてスクリプトを変更できるほどの知識を身に付ける必要があります。
これに関する参考資料としては、JMP の [ヘルプ] プルダウン メニューから利用できるスクリプト ガイドとスクリプト インデックスが挙げられます。
もちろん、JMP ディスカッション コミュニティがスクリプトの学習をサポートします。
Re: LSMeans Differences Student's t からのデータの報告素晴らしい作品をありがとうございました!
スクリプトを実行しようとしましたが、エラーが発生します。古いケースを参照したり、For Each 関数とエラーの両方を Google で検索したり、スクリプトを変更しようとしたりしましたが、うまくいきませんでした。バージョン 16 を使用していますが、これがスクリプトに問題を引き起こす可能性がありますか?
私の考えでは、このエラーは {rpt, group} に起因しています。For Each ですべてを削除しようとしましたが、それでもこのエラーが発生します。

大部分は理解できますが、この rpt はどこから取得され、どのように使用されるのでしょうか? For Each( {rpt, group} ...) でのみ言及されているため、どのように適合するかを合理的に説明できません。
Re: LSMeans Differences Student's t からのデータの報告どのバージョンの JMP を使用していますか? For Each() はバージョン 16 で JMP に追加されました。Fit Mod の By() 機能は JMP 18 まで追加されませんでした。
これら両方の変更を処理するには、スクリプトを変更する必要があります。
Re: LSMeans Differences Student's t からのデータの報告私は JMP バージョン 16.1.0 を使用しているので、それが原因であるに違いありません。
FitMod 関数を別の関数に置き換える必要がありますか、それとも FitMod を別の方法で引き続き使用できますか?
Re: LSMeans Differences Student's t からのデータの報告以下はスクリプトの修正版です。JMP 16 でテストしました。By 句を削除し、各レベルの ID に対して個別にフィット モデルを実行する For Each() ループに機能を置き換えました。次に、スクリプトは個別のフィット モデル出力からの出力を収集し、最終的な出力表示を生成します。

Names Default To Here( 1 );
sd = //Open( "test_table.jmp" );
Data Table( "test_table" );
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
// Loop across each levle of ID
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);
// Set the lists for the storage of the data from the by groups
testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] <<
get as matrix;
meandiff = Round( Abs( crossTab[1, 2] ), 4 );
lowerCL = Round( Abs( crossTab[3, 2] ), 3 );
upperCL = Round( Abs( crossTab[4, 2] ), 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Differeence in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || ";" || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Test Value", testvalue ),
String Col Box( whereCol, ByGroups ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );Re: LSMeans Differences Student's t からのデータの報告こんにちは、ジムさん
どうもありがとうございます!
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告こんにちは、ジムさん
追加の質問があります。多くのテスト値を使用して分析を実行したい場合、次のいずれかを実行できますか。
1. FitModel でループを作成し、上記のスクリプトのように続行しますか?
2. 1 つのレポートでレポートを取得し、上記のスクリプトのようにデータを保存するスクリプトを実行して、個別に分析を実行しますか?
それとも、他に調べてみるべき方法があるのでしょうか?
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告ジュリー、
どちらのアプローチもおそらく機能するでしょう。
この決定は、最初に行うには非常に大きな決断のように思えます。まず、最終製品がどのようなものになるかを考え、次にスクリプトを取得して、2 つのテスト値だけでその結果が得られるように修正します。これにより、どのようなアプローチを取るべきかについてもう少し情報が得られ、スクリプトを最終製品に拡張するために、JSL のどの領域についてさらに学習する必要があるかが明らかになります。
Re: LSMeans Differences Student's t からのデータの報告こんにちは、ジムさん
両方のアプローチが JSL で実行可能であることがわかってよかったです。
コードを変更して、Y( :"Test value"n ) がすべての連続列を通過するようにすることは可能でしょうか?
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
// Loop across each level of ID
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( :"Test value"n ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
:"Test value"n << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);私は他の多くのループを見て、次のように変更しようとしました。
Names Default To Here( 1 );
sd = Open( "test_table_002.jmp" );
Data Table( "test_table_002" );
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :ID ) );
colList = sd << Get Column Names( Continuous, String );
// Loop across each level of ID
For Each( i = 1, i <= Nitems( colList ), i++,
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( colList ),
Effects( :Person ),
Random Effects( :Day[:Person] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
colList << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :ID == ByGroups[group] ),
SendToReport(
Dispatch( {"Test value ID=A1"}, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"Test value ID=A1", "Person"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
);
);しかし、完全に理解できないエラー コードが表示されます。
テストテーブルを添付し、正しいものを添付したことを再確認しました。
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告エラーメッセージは何ですか?
Re: LSMeans Differences Student's t からのデータの報告エラーメッセージは次のとおりです:

今のところスクリプトには43行しかありません
Re: LSMeans Differences Student's t からのデータの報告スクリプトの変更はほぼ完了です。11行目で指定しているのは
For Each( i = 1, i <= Nitems( colList ), i++,
それはそうであるべきだ
For( i = 1, i <= Nitems( colList ), i++,
For Each() 関数と For() 関数には大きな違いがあります。2 つの異なる関数の定義と例は、スクリプト インデックスにあります。
また、参照先を次のように変更する必要があります。
列リスト
15 行目と 23 行目で、colList 内のどの項目を参照するかを指定します。
変数「i」をインデックス値として使用しているため、次の値を指定する必要があります。
colList[i]
提供されたサンプルデータテーブルでは、数値(連続)列としてテスト値列のみがあるため、For()関数でループするのは1回だけです。ただし、数値(連続)列をさらに追加すると、前述の構文を変更してコーディングすると、数値(連続)列ごとに実行されます。
Re: LSMeans Differences Student's t からのデータの報告ありがとうございます。とても納得できました!
最後に質問ですが、レポートに送信されるディスパッチ内のテキストを変更したい場合は、どうすればよいでしょうか?
現在は「テスト値 ID=A1」となっており、出力されるのは fx テスト値 1 または テスト値 2 です。「テスト値 ID=colList」に変更しようとしたところ、同じ内容が出力されたため、動作がわかりません。
ID A1 の fx テスト値 1 に対して、次のテキストを印刷したいと思います: "テスト値 1、ID=A1"。さまざまな文字列と関数を試しましたが、エラーが発生するか、以前と同じものが印刷されます。
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告あなたの言っていることが理解できません。別の方向からアプローチします。これがデータテーブルの列テスト値1の出力です。

この出力から何を変更しますか?
Re: LSMeans Differences Student's t からのデータの報告ジム様
変更したい画像の場所と変更内容を次のように書きました:

ID を指定しないと、複数の ID がある場合にポップアップ表示されるさまざまなウィンドウを区別する方法がわかりません。
これでもっと分かりやすくなるといいのですが:)
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告表示ツリー オブジェクトを調整することで、レポート出力の値を変更できます。

追加することで
report(fm)[OutlineBox(1)]<<SET title=""></SET>
prior to
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
タイトルを希望の値に変更します
Re: LSMeans Differences Student's t からのデータの報告ジム様
ご協力いただき、本当にありがとうございました。本当に感謝していますし、私にとっても非常に勉強になりました。スクリプトは完全に機能し、多くのデータセットで使用できるようになりました。
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告ジム様
スクリプトを使用していたのですが、データを印刷すると、パラメータ リストにさまざまなテスト値パラメータがすべて表示されず、テスト値 1 のみが表示されることに気付きました。

私はそれがスクリプトの次の部分からだと気づきました:
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
変更を試みましたが、単一のパラメータのみが印刷されるか、エラーが発生するか、どこから来たのかわからないものが印刷されます。
よろしくお願いします、
ジュリー
Re: LSMeans Differences Student's t からのデータの報告使用している完全なスクリプトを再構築することはもうできません。 使用している完全なスクリプトを添付してください。
Re: LSMeans Differences Student's t からのデータの報告こんにちは、ジムさん
動作するデータ テーブルとスクリプトを添付しました。
BR/
ジュリー
Re: LSMeans Differences Student's t からのデータの報告私はこの問題を解決するために近道をとりました。各実行後、および Outline Box() タイトルが設定された直後に入力される「titles」という JMP リストを追加しました。その後、dlg セクションの Table Box() で titles リストを使用します。

Names Default To Here( 1 ); // will ignore normal JSL naming
sd = currentdatatable(); // call upon open data table
// Define that Fitmod is empty. We will fill this with our information in the loop
Fitmod = {};
// Determine the levels in the ID column
summarize( sd, ByGroups = By( :Batch ) );
// Determine the result columns
colList = sd << Get Column Names( Continuous, String );
sum = 0; // Prepare getting the total number of result columns. Will be updated in the loop
titles = {};
// Loop across each level of Batch
nw_means = New Window("My Report",
For( i = 1, i <= Nitems( colList ), i++,
For Each( {BG, group}, ByGroups,
Fm = Fit Model(
Y( colList[i] ),
Effects( :Laboratory ),
Random Effects( :Day[:Laboratory] ),
NoBounds( 0 ),
Personality( "Standard Least Squares" ),
Method( "REML" ),
Emphasis( "Effect Leverage" ),
Run(
colList[i] << {Summary of Fit( 1 ), Analysis of Variance( 0 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
Plot Residual by Normal Quantiles( 0 ), {:Person << {LSMeans Student's t( 0.05 )}}}
),
Where( :Batch == ByGroups[group] ),
SendToReport(
Dispatch( {"" }, "Whole Model", OutlineBox, {Close( 1 )} ),
Dispatch(
{"", "Laboratory"},
"Leverage Plot",
OutlineBox,
{Close( 1 )}
)
)
);
report(fm)[OutlineBox(1)] << set title(report(fm)[OutlineBox(1)] << get title || ", ID=" || BG);
// Save the pointer to the results in the Fitmod list
Insert Into( Fitmod, Fm );
insert into(titles, report(fm)[OutlineBox(1)] << get title);
);
sum = sum + 1
);
);
// Set the lists for the storage of the data from the by groups
testValue = dif = sumfit1 = sumfit2 = {};
// Loop across each by group and gather the data
For Each( {rpt, group}, Fitmod,
// Point to the current report
reportFitmod = Fitmod[group] << Report;
// Get the means for the 2 levels
sumfit = reportFitmod[Outline Box( "Least Squares Means Table" )][Number Col Box( 1 )] << Get as Matrix;
Insert Into( sumfit1, sumfit[1] );
Insert Into( sumfit2, sumfit[2] );
term = reportFitmod[Outline Box( "Least Squares Means Table" )][String Col Box( 1 )] << Get();
// Get By Group column
whereCol = Word( 2, ((reportFitmod << parent)[Text Box( 1 )]) << get text, ":=)" );
// Get data from CrossTab table
crossTab = reportFitmod[Outline Box( "LSMeans Differences Student's t" )][CrosstabBox( 1 )] << get as matrix;
meandiff = Round( crossTab[1, 2] , 4 );
lowerCL = Round( crossTab[3, 2] , 3 );
upperCL = Round( crossTab[4, 2] , 3 );
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
// Create the Difference in mean and CL string
Insert Into( dif, Char( meandiff ) || " [" || Char( lowerCL ) || " ; " || Char( upperCL ) || "]" );
);
// Create the table
dlg = New Window( "Custom Report",
Outline Box( "Selected Values",
Lineup Box( N Col( 2 ), Text Box( "Factor of Interest: " ), Text Box( term[1] ) ),
Spacer Box( size( 0, 10 ) ),
tb = Table Box(
String Col Box( "Paramenter", titles ),
String Col Box( whereCol, repeat(ByGroups, sum) ),
Number Col Box( "Mean, " || term[1], sumfit1 ),
Number Col Box( "Mean, " || term[2], sumfit2 ),
String Col Box( "Difference in mean and CI", dif )
)
)
);
tb << Set Shade Headings( 0 ); // Turn off shaded table headings.
tb << Set Column Borders( 1 ); // Turn off table column borders.
tb << Set row Borders( 1 );
tb << border( 1 );
Re: LSMeans Differences Student's t からのデータの報告完璧です!ありがとう