你好,
有没有办法确定特定参数的最佳拟合,仅针对该模型拟合生成能力分析表,然后仅针对新窗口中的最佳拟合重新组织显示框(如下图所示)?另外,我可以维护这些功能吗?
这是我尝试过的:它在很大程度上有效......
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
dis = Distribution(
Continuous Distribution(
Column( :NPN1 ),
Quantiles( 0 ),
Vertical( 0 ),
Outlier Box Plot( 1 ),
Fit Normal( Show Fit( 0 ), Process Capability( LSL( 104.41 ), Target( . ), USL( 131.89 ), Show as Graph Reference Lines ) ),
Fit Johnson( Show Fit( 0 ) ),
Fit Cauchy( Show Fit( 0 ) ),
Fit Student's t( Show Fit( 0 ) ),
Fit SHASH( Show Fit( 0 ) ),
Fit Normal 2 Mixture( Show Fit( 0 ) ),
Fit Normal 3 Mixture(
Process Capability( LSL( 104.41 ), Target( . ), USL( 131.89 ), Show as Graph Reference Lines, Show Within Capability( 0 ) )
),
Customize Summary Statistics( Std Err Mean( 0 ), Upper Mean Confidence Interval( 0 ), Lower Mean Confidence Interval( 0 ), N Missing( 0 ) )
)
);
New Window( "",
Show Menu( 0 ),
show toolbars( 0 ),
H List Box(
Panel Box( ,
Report( dis )["NPN1", List Box( 3 )]
),
V List Box(
Spacer Box( size( 0, 10 ) ),
Report( dis )["NPN1", "Summary Statistics"],
Spacer Box( size( 0, 10 ) ),
Report( dis )["NPN1", "Fitted Normal 3 Mixture Distribution", "Process Capability", "NPN1(Mixture of 3 Normals) Capability",
"Overall Sigma Capability"],
Spacer Box( size( 0, 10 ) ),
Report( dis )["NPN1", "Fitted Normal 3 Mixture Distribution", "Process Capability", "NPN1(Mixture of 3 Normals) Capability",
"Nonconformance"]
)
),
Panel Box( ,
Table Box(
Report( dis )["NPN1", "Compare Distributions"]
)
)
);
dis << close window;
您可以通过发送消息 << Fit All 到分布并从表框中获取第一行来获得“最佳拟合”,但这应该仅用于探索性分析(这里有很好的讨论脚本 - 如何选择最佳拟合分布并收集能力参数? )。然后,您可以将它们收集到关联数组,其中键是列名称和值分布,或者将它们设置为分布列属性。最后使用您希望使用的平台创建最终绘图。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
get_best_dist = function({dt, colname}, {Default Local},
dist = dt << Distribution(
Continuous Distribution(
Column(Eval(colname)),
Process Capability(0)
),
Invisible,
Histograms Only
);
dist << Fit All;
scb = Report(dist)[Outline Box("Compare Distributions"), Table Box(1), StringColBox(1)];
bestdist = scb[1];
dist << close window;
return(bestdist);
);
aa_dist = Associative Array();
colrefs = dt << Get Column Group("Processes");
For Each({colref}, colrefs,
Try(
colname = colref << get name;
curdist = get_best_dist(dt, colname);
aa_dist[colname] = curdist;
Eval(EvalExpr(Column(dt, colname) << Set Property("Distribution", Expr(curdist))));
,
show(colref);
);
);