大家好!
在預測刻畫器中,使用者能夠使用給定的預測公式、輸入和規格限制來產生 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 ) ) )
);
