2,000개 이상의 행이 있는 테이블이 있습니다. 각 데이터 행의 정규성을 테스트해야 합니다. 각 데이터 행의 끝에 PValue를 입력합니다. 수식이 있습니까?
데이터 테이블에 새 열을 만듭니다.Col Info로 이동하여 열 형식을 "PValue"로 설정하십시오.
그런 다음 새 열에 대한 수식 편집기를 열고 아래 열을 붙여넣습니다.
dt = Current Data Table();
// change the Index value for the starting column number of the columns to be analyzed
theRow = dt[Row(), Index( 5, N Col( dt ) - 1 )];
// Create a temporary working data table to calculate the normality on
dtTemp = New Table( "temp", private, New Column( "x", values( theRow ) ) );
// Run the Distribution Platform to calculate the normality
dis = Distribution( invisible, Continuous Distribution( Column( :x ), Fit Normal( Goodness of Fit( 1 ) ) ) );
// Retrieve the P Value of the Normality statistic
pval = (Report( dis )["Goodness-of-Fit Test", Number Col Box( 2 )] << get)[1];
// Clean up the behind the scenes working table and display
dis << close window;
Close( dtTemp, nosave );
// Apply the pvalue to the current row
pval;
이 수식은 2000 행 테이블에서 실행하는 데 몇 분 정도 걸립니다.
위 수식의 주석은 수식의 일부로 저장되지 않습니다(수식의 실행 가능한 부분만 유지하기 위한 JMP 효율성).
일반적으로 JMP 데이터는 데이터 구조와 90도 다른 형식으로 지정됩니다.열에는 분석할 데이터가 포함되며 행은 지정된 측정에 대한 다양한 인스턴스를 나타냅니다.