大家好!
在预测刻画器中,用户能够使用给定的预测公式、输入和规格限制生成 PPM 值。 只需点击分析器 GUI 设置中预测分析器旁边的“模拟”按钮即可完成此操作。 此时,将生成一个包含平均值、PPM 和标准差值的表。
我好奇:此过程是否可以在脚本(或 GUI 中的其他位置)中自动执行,以便为任何输入变量在设定的值范围内生成多个 PPM 值。 我将使用这些数据来绘制并显示各种 PPM 值与给定输入参数的关系。 到目前为止,我还没有找到一种方法来做到这一点。 目前唯一的方法是简单地更改输入值并再次点击模拟按钮,然后手动记录输出 PPM 值。 这显然不是一种非常有效的方法,但是通过我在网上和这些论坛中的搜索,我没有找到其他方法。
我将非常感谢任何有助于自动化此过程的提示! 谢谢。
谢谢@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> )
)
);如果我添加此等效代码,则会弹出“规格限制”对话框,但我无法在“规格限制()”调用中使用各种表达式填充它。 我一直很难找到像这样的小事情的任何文档。
你好@谷物盖伊,欢迎来到社区!
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 ) ) )
);
