大家好,
在我试图绘制的数据中,我有一些虚假的数据点,这些数据点偏离了平均值和控制限制。 我想隐藏和排除这些数据点,然后使用我的JMP脚本重新绘制数据。 以下是脚本中绘制数据的部分,将数据点标记在+/- 6 sigma之外,并且应该在最终绘图中过滤掉它们:
rpt = Control Chart Builder(
Size( 682, 464 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Variables( Subgroup( :TEST_DATE ), Y( :INFL_WL_MED ) ),
// Add a cusom warning test to mark points outside of +/- 6 sigma
Customize Tests( Test 1( 6, "1" ) ),
Chart( Position( 1 ), Limits( Sigma( Moving Range ) ), Warnings( Test 1( 1 ) ) ),
By( :EPI_RUN, :TEST_SYSTEM )
);
// create the summaries table (contains a column showing test failures)
dt_sum = obj << save summaries;
// clear any existing row states
dt << clear row states();
// loop through each row in the summary table looking for failures
for each row( dt_sum,
// if this row did not meet our criteria, select the corresponding row in the main table
If( :Test Failures == "1",
dt << Select Rows( Row() )
)
);
// Hide exclude all of the selected rows.
dt << Hide and Exclude( 1 );
dt << clear select();该脚本将数据点标记为+/- 6 sigma,但异常值不会被过滤掉,并且数据不会被重新绘制。 任何帮助将不胜感激。
谢谢,
-麦克风
您需要打开“自动重新计算”选项。 这将强制图表生成器在行状态更改时重新计算。 以下是脚本索引的示例
帮助==>脚本索引==>控制图生成器==>自动重新计算
Names Default To Here( 1 );
dt = Open(
"$SAMPLE_DATA/Quality Control/Coating.jmp"
);
obj =
Control Chart Builder(
Variables( Y( :Weight ), Subgroup( :Sample ) )
);
obj << Automatic Recalc( 1 );
dt << Select Rows( 5 ) << Exclude( 1 );