腳本 - 從分銷過程能力中提取規格限制我正在嘗試編寫一個腳本(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] );
)
);