그래서 YbyX 플롯을 만들고 Tukey T-Test를 수행 한 다음 p- 값과 결합 된 dt를 만든 다음 p- 값을 기준으로 선택하고 제외하는 스크립트가 있습니다.
현재 소스 데이터 테이블에 저장하기 위해 dt << New Script () 함수에 포함되어 있습니다.
무슨 일이 일어나고 있는지 잘 모르겠지만 p- 값을 선택하는 섹션으로 이동하면이 오류가 발생합니다.
dt1 << select where("p-Value"n > 0.05);이름 미해결 : 'p-Value', "p-Value"n / * ### * / 액세스 또는 평가에서 행 1의 p-Value
이상한 점은 이것을 빈 새 스크립트 창에 복사하고 수동으로 실행하면 작동한다는 것입니다. 무슨 일이 일어나고 있는지, 왜 그런지 잘 모르겠습니다. 어떤 아이디어?
//need to force it to use a certain file name AND force SPC script to label dt appropriately
dtSPC = current data table();
dtSPC << set name( "SPC Data");
/*plotting a basic Fit YbyX just to get pValues. Formatting and style done on final plot*/
ow1 = Oneway(
Y( :MEAN ),
X( :TOOL_PROCESS_CHAMBER ),
By(Chart_ID,),
//All pairs Tukey HSD test
All Pairs(
1,
Confidence Quantile( 0 ),
Difference Matrix( 0 ),
LSD Threshold Matrix( 0 ),
Connecting Letters Report( 0 ),
Ordered Differences Report( 1 )
),
SendToReport(
//x-axis formatting
Dispatch(
{},
"2",
ScaleBox,
{Label Row(
{Label Orientation( "Angled" ), Lower Frame( 1 ),
Show Major Grid( 1 ), Tick Mark Style( "Long Divider" )}
)
}
),
//row legend by chamber
Dispatch(
{},
"Oneway Plot",
FrameBox,
{Marker Size( 6 ), Marker Drawing Mode( "Normal" ),
Row Legend(
:Chamber,
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)
}
)
)
);
/***********************************/
/***********************************/
// Create the combined data table of Summary Statistics
dt1 = Report( ow1[1] )["Means Comparisons", "Comparisons for all pairs using Tukey-Kramer HSD","Ordered Differences Report"][Table Box( 1 )] << Make Combined Data Table;
dt1 = current data table();
dt1 << set name( "pValue PairWise by Channel Tukey");
dt1:Chart_ID << Data type( Numeric ) << Set Modeling Type( Nominal );
/***********************************/
/**********************************/
//Screen and show only the Channel_ID's w/ a Tukey pair pVal<0.05
//exclude all high pVal rows, leaving only low pVal Channels. Does not work in reverse.
dt1 << select where("p-Value"n > 0.05);
dt1 << exclude;
dt1 << clear select;
//create a list of remaining Unique Chart_ID
summarize(dt1, uniqueVals=by(:Chart_ID));
//Convert to numeric
For( i = 1, i <= N Items(uniqueVals ), i++,
uniqueVals[i] = Num(uniqueVals[i] )
);
//extra, just to look at the data
//dtUnique = New Table( "uniqueVals less 0.05");
//dtUnique << New Column( "Chart_ID", Values(uniqueVals));
//select on SPC source data just the channels w/ low pVals
//need to choose SPC data table
dtSPC << clear select;
dtSPC << select where( contains( uniqueVals, :Chart_ID));
//invert and exclude, leaving only low pVal Chart_ID's
dtSPC << invert row selection << exclude;
dtSPC << clear select;
//close old stuff
close(dt1);
ow1 << close window;
58행에서 참조를 변경해 보십시오.
dt1 = Current Data Table();
NS
current data table( dt1 );
차이점은 첫 번째 명령문에서 dt1의 값을 현재 데이터 테이블이 무엇이든 설정하고 JMP가 원하는 테이블을 가리키지 않을 수 있다는 것입니다.두 번째 명령문은 dt1을 현재 데이터 테이블로 설정하도록 JMP에 선언합니다.