LSMeans Differences 학생의 데이터 보고안녕하세요 여러분,
저는 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 학생의 데이터 보고JMP 커뮤니티에 오신 것을 환영합니다.
첨부하신 데이터 테이블과 첨부하신 스크립트 사이에 혼동이 있는 것 같습니다. 스크립트에서 분석할 열에 대한 참조가 첨부된 데이터 테이블의 열과 일치하지 않습니다.
올바른 첨부 파일을 제공해 주시면 커뮤니티가 여러분의 노력을 도울 수 있을 것으로 확신합니다.
Re: LSMeans Differences 학생의 데이터 보고친애하는 짐,
혼동에 대해 사과드립니다. 알려주셔서 감사합니다. 이제 올바른 스크립트를 첨부했습니다.
줄리
Re: LSMeans Differences 학생의 데이터 보고이것은 당신에게 최종 제품을 얻는 데 유리한 점이 될 수 있습니다.

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 학생의 데이터 보고안녕하세요 짐,
모든 다른 요소가 있는 테이블을 생성하기 위해 여러 ID가 있는 경우 스크립트를 어떻게 변경해야 합니까? 이를 위해 루프를 구현할 수 있습니까?
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고여러 레벨의 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 );
이제 여러분의 일은 스크립트를 연구하고 스크립트가 무엇을 하는지 배우는 것입니다. 스크립트는 여러분이 지정한 샘플 데이터 테이블과 Fit Model에서 작동합니다. 그러나 다른 열과 다른 Fit Model 실행을 가진 다른 데이터 테이블은 보고서 출력을 생성하는 JSL에서 작동하지 않을 수 있습니다. 여러분은 여러분의 필요에 맞게 스크립트를 수정할 만큼 충분히 지식이 있어야 합니다.
이에 대한 좋은 참고 자료로는 JMP의 도움말 풀다운 메뉴에서 사용할 수 있는 스크립팅 가이드와 스크립팅 인덱스가 있습니다.
물론, JMP 토론 커뮤니티가 스크립트 학습을 도와드릴 것입니다.
Re: LSMeans Differences 학생의 데이터 보고훌륭한 작업에 감사드립니다!
스크립트를 실행하려고 했지만 오류가 발생합니다. 이전 사례를 탐색하고 For Each 함수와 오류를 구글에서 검색하고 스크립트를 수정하려고 했지만 소용이 없었습니다. 버전 16을 사용하는데 스크립트에 문제가 될 수 있을까요?
제 생각에는 오류는 {rpt, group}에서 비롯된 것 같습니다. For Each에서 모든 항목을 제거하려고 했지만 여전히 이 오류가 발생합니다.

대부분 이해할 수 있지만, 이 rpt는 어디서 구했고 어떻게 사용하나요? For Each({rpt, group} ...)에서만 언급되어서 어떻게 들어맞는지 합리적으로 설명할 수 없습니다.
Re: LSMeans Differences 학생의 데이터 보고어떤 버전의 JMP를 사용하고 계신가요? For Each()는 JMP 버전 16에 추가되었습니다. Fit Mod의 By() 기능은 JMP 18까지 추가되지 않았습니다.
이 두 가지 변경 사항을 모두 처리하려면 스크립트를 수정해야 합니다.
Re: LSMeans Differences 학생의 데이터 보고저는 JMP 16.1.0 버전을 사용하는데, 그게 이유인 듯합니다.
FitMod 함수를 다른 함수로 바꿔야 하나요, 아니면 FitMod를 다른 방식으로 사용해도 되나요?
Re: LSMeans Differences 학생의 데이터 보고다음은 스크립트의 수정된 버전입니다. JMP 16에서 테스트했습니다. By 절을 제거하고 기능을 ID의 각 레벨에 대해 개별적으로 Fit Model을 실행하는 For Each() 루프로 대체했습니다. 그런 다음 스크립트는 각 개별 Fit Model 출력에서 출력을 수집하여 최종 출력 디스플레이를 생성합니다.

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 학생의 데이터 보고안녕하세요 짐,
매우 감사합니다!
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고안녕하세요 짐,
추가 질문이 있습니다. 많은 테스트 값으로 분석을 실행하려면 다음 중 하나를 수행할 수 있습니까?
1. FitModel로 루프를 만든 다음 위 스크립트와 같이 계속 진행할까요?
2. 보고서를 하나의 보고서로 가져와서 별도로 분석을 수행한 다음, 위 스크립트처럼 데이터를 저장하는 스크립트를 실행합니까?
아니면 제가 조사해야 할 다른 방법이 있습니까?
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고줄리,
두 가지 접근 방식 모두 효과가 있을 것 같습니다.
이 결정을 내리는 것은 처음에 내리기에는 엄청나게 큰 결정인 것 같습니다. 먼저 최종 제품이 어떻게 생겼으면 하는지 생각해 내고, 그런 다음 스크립트를 가져와서 수정하여 두 가지 테스트 값에서만 그 결과를 얻을 수 있도록 합니다. 그러면 접근 방식이 어떤 것인지에 대한 정보를 조금 더 얻을 수 있고, 스크립트를 최종 제품으로 확장하기 위해 JSL에서 더 알아야 할 영역을 알 수 있습니다.
Re: LSMeans Differences 학생의 데이터 보고안녕하세요 짐,
두 가지 접근 방식 모두 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 학생의 데이터 보고오류 메시지는 무엇인가요?
Re: LSMeans Differences 학생의 데이터 보고오류 메시지는 다음과 같습니다.

지금 스크립트에 43줄만 있습니다
Re: LSMeans Differences 학생의 데이터 보고스크립트 수정이 거의 완료되었습니다. 11번째 줄에서 다음을 지정하고 있습니다.
For Each( i = 1, i <= Nitems( colList ), i++,
그것은해야합니다
For( i = 1, i <= Nitems( colList ), i++,
For Each()와 For() 함수 사이에는 큰 차이가 있습니다. 두 가지 다른 함수의 정의와 예는 스크립팅 인덱스에서 찾을 수 있습니다.
또한 참조도 변경해야 합니다.
col리스트
15번째 줄과 23번째 줄에서는 colList의 어떤 항목을 참조하는지 지정합니다.
변수 "i"를 검색 인덱스 값으로 사용하고 있으므로 다음을 지정해야 합니다.
colList[i]
제공하신 샘플 데이터 테이블에서 숫자(연속) 열로 Test Value 열만 있으므로 For() 함수로 한 번만 루프를 돌릴 수 있습니다. 그러나 숫자(연속) 열을 더 추가하면 내가 언급한 구문을 수정하여 코드를 작성하면 숫자(연속) 열 각각에 대해 실행됩니다.
Re: LSMeans Differences 학생의 데이터 보고고맙습니다. 정말 말이 되죠!
마지막으로, 보고서에 전송되는 Dispatch의 텍스트를 변경하고 싶다면 어떻게 해야 할까요?
현재는 "테스트 값 ID=A1"이고 인쇄되는 것은 fx 테스트 값 1 또는 테스트 값 2입니다. "테스트 값 ID=colList"로 변경하려고 했을 때 동일한 내용이 인쇄되었으므로 어떻게 작동하는지 이해할 수 없습니다.
ID A1인 fx 테스트 값 1에 대해 다음 텍스트를 인쇄하고 싶습니다: "테스트 값 1, ID=A1". 다른 문자열과 함수로 시도했지만 오류가 발생하거나 이전과 동일하게 인쇄됩니다.
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고당신이 무슨 말을 하는지 이해가 안 갑니다. 다른 방향에서 접근해 보겠습니다. 여기 Test Value 1 열에 대한 데이터 테이블의 출력이 있습니다.

이 출력에서 무엇을 변경하고 싶습니까?
Re: LSMeans Differences 학생의 데이터 보고친애하는 짐,
나는 그것을 바꾸고 싶은 곳과 무엇에 대해 그림에 적었습니다:

ID를 지정하지 않으면 여러 개의 ID가 있을 때 팝업되는 다양한 창을 어떻게 구분해야 할지 모르겠습니다.
이것이 더 이해가 되기를 바랍니다:)
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고디스플레이 트리 객체를 조정하여 보고서 출력 값을 변경할 수 있습니다.

추가하여
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 학생의 데이터 보고친애하는 짐,
여러분의 도움에 정말 감사드립니다! 정말 감사하고 저에게도 엄청난 학습이 되었습니다. 스크립트는 이제 완벽하게 작동하며 많은 데이터 세트와 함께 사용할 수 있습니다.
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고친애하는 짐,
스크립트를 사용하다가 데이터를 인쇄할 때 매개변수 목록에 모든 테스트 값 매개변수가 제공되지 않고 테스트 값 1만 제공된다는 것을 알게 되었습니다.

이는 스크립트의 다음 부분에서 나온 것임을 알고 있습니다.
// Get the Response variable name
Insert Into( testValue, (Substr( (reportFitmod << topparent)[Outline Box( 1 )] << get title, 10 )) );
변경을 시도해 보았지만 여전히 단일 매개변수만 인쇄하거나 오류를 표시하거나 어디서 나온 것인지 알 수 없는 내용을 인쇄합니다.
감사합니다,
줄리
Re: LSMeans Differences 학생의 데이터 보고더 이상 당신이 사용하고 있는 전체 스크립트를 재구성할 수 없습니다. 당신이 사용하고 있는 전체 스크립트를 첨부해 주세요.
Re: LSMeans Differences 학생의 데이터 보고안녕하세요 짐,
작동하는 데이터 테이블과 스크립트를 첨부했습니다.
브라질/
줄리
Re: LSMeans Differences 학생의 데이터 보고저는 문제를 해결하는 데 지름길을 택했습니다. 저는 각각이 실행되고 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 학생의 데이터 보고완벽해요! 고맙습니다