从一个表中的数据开始,另一个表中的规格限制曾经是开始大规模能力分析的一种艰难方法。 虽然在某些行业领域中编写 JSL 程序将规范从一个表加载到包含数据的表的列属性中可能是一种通行权,但还有一些更好的选择。 时间JMP 12 中的能力分析平台使处理数据和单独的规格表成为一项快速轻松的任务。 在本文中,我将讨论如何利用 JMP 功能平台来解决将数据从规格表添加到数据表的列属性的问题。 手动逐步完成流程只需点击几下(过程能力平台示例),但最终目标是编写平台脚本以自动执行分析并根据规格限制更新数据表的列属性。 事实证明,使用相当紧凑的脚本就非常容易。
下面所附的脚本大部分取自脚本索引,其中包含 JMP 开发人员 Lancaster 博士提供的一些非常有用的提示。
该脚本首先从数据表中获取连续数值的列。
接下来创建一个空参数。 变量“y”指的是空的“process Variables()”参数。 然后该表达式将填充“dty”中保存的列名称。
表达式可在多个点使用,因为在引用引用表达式的变量之前不会计算表达式。
下一个表达式用于生成能力报告,现在填充的过程变量参数被插入到 obj 中,从而完成该功能。 “过程变量(名称)”插入到哪里? 这并不重要,因为“Process Capability()”中的所有内容都只是另一个参数。
Process Capability() 中有两个重要参数需要注意。 第一个是“规格限制(导入...”),它告诉平台哪个表包含规格限制。第二个,“规格限制对话框(“否(跳过...”)此参数会导致与让平台跳过没有规格的列而不是提示用户提供规格相同的平台行为。 (或者,“不,不要提示,只需跳过缺少规格的列。”)
脚本的最后部分提供了对报告的引用,以根据整体西格玛摘要报告制作数据表,并将规格保存到新数据表和原始数据表的列属性中。
我希望您觉得这个解释有用。 我还附上了我在最近的 JMP 日使用的幻灯片。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
dty = dt << GetColumnNames( numeric, continuous );
y = Expr( process variables() ); //this constructs the "process variables" argument that is inside the process capability function.
n = N Items( dty );
For( i = 1, i <= n, i++,
Insert Into( y, dty[i] ) // the column names, not name strings, are inserted and comma delimited
);
obj = Expr( // this is an expression so that it won't be evaluated and we can do things to it later
Process Capability(
Spec Limits( Import Spec Limits( "$SAMPLE_DATA/CitySpecLimits.jmp" ) ),// file path and file name of the specs table
Spec Limits Dialog( "No (skip columns with no spec limits)" ),// Handy thing to know, Thank you Dr. Lancaster!!
Overall Sigma Summary Report( 1 )
)
);
Insert Into( obj, Name Expr( y ) ); // this is later and we insert "y" which is "process variables( column names )" show( name expr(y)) to see it
pr = obj << report; // pr becomes a handle for the report, and obj gets evaluated
dt2 = pr[Table Box( 2 )]<< Make Into Data Table;// this is where the the summary report is in the capability report
dt3=obj<<SAVE spec="" limits="" to="" new="" table=""></SAVE>
* 报告中使用的规格也包含在摘要报告中。