大家好!
在 Prediction Profiler 中,用户能够使用给定的预测公式、输入和规格限制生成 PPM 值。 这可以通过简单地点击分析器 GUI 设置中预测分析器旁边的“模拟”按钮来完成。 此时,将生成一个包含平均值、PPM 和标准偏差值的表格。
我好奇:此过程是否可以在脚本(或 GUI 中的其他地方)中自动化,以在任何输入变量的设定值范围内生成多个 PPM 值. 我将使用这些数据绘制并显示各种 PPM 值与给定输入参数的关系。 到目前为止,我还没有找到一种方法来做到这一点。 目前唯一的方法是简单地改变输入值并再次点击模拟按钮,然后手动记录输出 PPM 值。 这显然不是一种非常有效的方法,但是通过我在网上和这些论坛中的搜索,我还没有找到另一种方法。
我将不胜感激任何有助于自动化此过程的提示! 谢谢。
你好@CerealGuy ,欢迎加入社区!
JMP 中的模拟器有一个名为模拟实验的工具,它是为我相信您在这里尝试完成的任务而构建的。下面的脚本包含您应该能够遵循的注释,以及对模拟菜单的一些探索以找到正确的命令(查看分析器中模拟旁边的红色三角形)。这是您正在寻找的路径吗?
Names default to here(1);
// Open a sample data set and make a prediction for yield
dt = Open("$Sample_data/Ro.jmp");
fm = Fit Model(
Y( :Yield ),
Effects( :Aperture, :Ranging, :Cadence ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:Yield << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Lack of Fit( 0 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 1 ), Plot Regression( 0 ),
Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
);
fm << Prediction Formula;
// Use simulation in the profiler to estimate variation in yield at a single point
prf = Profiler(
Y( :Pred Formula Yield ),
Profiler(
1,
Term Value(
Aperture( 11.25, Lock( 0 ), Show( 1 ) ),
Ranging( 10, Lock( 0 ), Show( 1 ) ),
Cadence( 22.5, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
Aperture << Random( Normal( 11.25, 2 ) ),
Ranging << Random( Normal( 10, 1 ) ),
Cadence << Random( Normal( 22.5, 4 ) )
),
Responses( Pred Formula Yield << No Noise )
)
)
);
// Do a simulation experiment to calculation variation in yield for
// different levels of your inputs. Note that you might need to
// adjust the ranges for different variables before this step using
// 'resent factor grid' to ensure you explore the relevant space.
dtSim = prf << Simulator( Simulation Experiment( 512, 1 ) );
dtSim << New Column( "Lowest Yield Expected",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( :Pred Formula Yield Mean - 3 * :Pred Formula Yield SD )
);
// Graph results
dtSim << Graph Builder(
Size( 558, 552 ),
Show Control Panel( 0 ),
Variables(
X( :Aperture ),
Y( :Ranging ),
Wrap( :Cadence, Levels( 9 ) ),
Color( :Lowest Yield Expected )
),
Elements( Contour( X, Y, Legend( 9 ) ) )
);

谢谢@ih ,这个答案正是我要找的! 我感谢我所描述的每个部分的评论和详尽的代码。
我唯一的附加问题是如何在此脚本中从模拟器设置“规格限制”。 比如这个:
// Use simulation in the profiler to estimate variation in yield at a single point
prf = Profiler(
Y( :Pred Formula Yield ),
Profiler(
1,
Term Value(
Aperture( 11.25, Lock( 0 ), Show( 1 ) ),
Ranging( 10, Lock( 0 ), Show( 1 ) ),
Cadence( 22.5, Lock( 0 ), Show( 1 ) )
),
Simulator(
1,
Factors(
Aperture << Random( Normal( 11.25, 2 ) ),
Ranging << Random( Normal( 10, 1 ) ),
Cadence << Random( Normal( 22.5, 4 ) )
),
Responses( Pred Formula Yield << No Noise ),
<FONT color="#FF0000"> Spec Limits( Pred Formula Yield, LSL(0), USL(2) ) // insert actual Spec Limits Code here</FONT> )
)
);如果我添加此等效代码,则会弹出 Spec Limits 对话框,但我无法在“Spec Limits()”调用中使用各种表达式填充它。 我一直无法找到有关此类小事的任何文档。