脚本-从分布过程能力中提取规格限制我正在尝试编写一个脚本(JMP 16.0)来从数据集中选择列,创建分布,执行连续拟合“ALL”并在最佳拟合上生成过程能力(见下文)。
我遇到的问题是如何生成包含分布特征的表格,特别是生成的规格限制。此外,我也很难将所有分布合并到一个窗口中。任何指示都将不胜感激,我曾尝试查看可编写脚本的对象文档,但没有成功。
file = Current Data Table ();
TableList = List ();
For (i = 1, i <= NTable(), i++,
TableList [i] = Data Table (i) << Get Name
);
ColSelect = Column Dialog (
Column Use = ColList ("Add", Max Col (N Col()))
);
For (i = 1, i <= N Items(ColSelect["ColumnUse"]), i++,
colName = ColSelect ["ColumnUse"] [i] << Get Name;
obj = file << Distribution(
Continuous Distribution(Column(Eval(colName)), Fit ALL)
);
specLimits = obj << (Fit Handle["best"] << Process Capability( Set Sigma Multiplier for Quantile Spec Limits( 3 ), show limits ));
);数据探索与可视化质量与工艺工程回复:脚本 - 从分配过程能力中提取规格限制下面的脚本怎么样? 希望能帮助到你。
file = Open("$SAMPLE_DATA/Cities.jmp");
ColSelect = Column Dialog( Column Use = ColList( "Add", Max Col( N Col() ) ) );
If( ColSelect["Button"] != 1,
Throw();
);
spec limit aa = Associative Array();
nw = New Window( "Combined Results",
H List Box(
For( i = 1, i <= N Items( ColSelect["ColumnUse"] ), i++,
colName = ColSelect["ColumnUse"][i] << Get Name;
obj = file << Distribution(
Continuous Distribution( Column( Eval( colName ) ), Fit ALL )
);
rpt = obj << report;
best dist = rpt[Outline Box( "Compare Distributions" )][Table Box( 1 )][
String Col Box( 1 )] << get( 1 );
Eval(
Eval Expr(
obj << (Fit Handle[Expr( best dist )] <<
Process Capability( Set Sigma Multiplier for Quantile Spec Limits( 3 ) ))
)
);
spec limits = rpt[Outline Box( "Process Capability" )][
Outline Box( "Process Summary" )][Table Box( 1 )][Number Col Box( 1 )] << get;
spec limit aa[colName] = Eval List( {spec limits, best dist} );
)
)
);
//Save to New Data Table
result dt = New Table( "Results" );
colnames = spec limit aa << get keys;
result dt << addmultiplecolumns( "key", N Items( colnames ), Numeric );
For( i = 1, i <= N Col( result dt ), i++,
Column( result dt, i ) << set name( colnames[i] )
);
result dt << addrows( 5 );
For( j = 1, j <= N Col( result dt ), j++,
For Each Row(
i = Row();
Try( result dt[i, colnames[j]] = spec limit aa[colnames[j]][1][i] );
)
);