大家好,
我有一個包含許多輸出的實驗,我想獲取腳本中預測公式給出的值,以將它們發送到數據表。 有人知道該怎麼做嗎?
謝謝,
何塞·安吉爾
在你的腳本中嘗試這個
rfit = fit << Report;
pf=rfit["Prediction Profiler"] << get scriptable object;
pf << Remember Settings;
dtout = (rfit["Prediction Profiler"]["Remembered Settings"][Table Box(1)]<< Make Into Data Table);
將模型儲存為列公式的建議是一個很好的建議。 有很多使用方法。
此範例說明如何以另一種方式直接取得分析器中顯示的值:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
fit = dt << Fit Model(
Y( :weight ),
Effects( :age, :sex, :height ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
age( 12, Lock( 0 ), Show( 1 ) ),
sex( "F", Lock( 0 ), Show( 1 ) ),
height( 62.55, Lock( 0 ), Show( 1 ) )
)
),
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), 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 )}
)
);
fit rep = fit << Report;
prediction = Num( fit rep["Prediction Profiler"][AxisBox(1)][TextBox(2)] << Get Text );如果您選擇旁邊的紅色三角形回應>儲存列>預測公式,它將向您的數據表添加一列,其中包含預測公式。 如果右鍵單擊該列,然後轉到公式(旁邊會有一個複選標記),您可以查看公式。