スクリプトの質問:保存する逆予測式を既存の列に強制しますこんにちは、みんな、
「逆予測式の保存」と呼ばれる線形モデルの「フィットカーブ」出力を、定義済みの既存の列(「予測濃度」など)に強制的に保存したいと思います。 これをスクリプト化することでそれは可能ですか? 新しいデータが定期的に入ってくるので、更新された逆予測式を計算して保存し、データセット内の既存の式を上書きするためにスクリプトを起動する必要がある理由は、スクリプトライブラリでこの例を見つけましたが、私はしますデータ内の既存の逆予測式を上書きする方法がわかりません。
Names Default To Here( 1 );
dt = Open(
"$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp"
);
obj = dt <<
Fit Curve(
Y( :Toxicity ),
X( :log Conc ),
Group( :formulation )
);
obj <<
Fit Logistic 4P(
Save Inverse Prediction Formula
);<BR /><BR />col1 = column (5);<BR />col1 << Set name ("Prediction Concentration");<BR />
ありがとう、
乾杯、ヴァレリー
Re:スクリプティングの質問:保存する逆予測式を既存の列に強制しますこれが1つの方法です:
Names Default To Here( 1 );
// Suppose "Prediction Concentration" is the column that should hold teh formula
dt = Open( "$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp" );
dt << NewColumn("Prediction Concentration", Numeric, Continuous, Values(1::NRow(dt)));
Wait(3);
// Do the analysis, the formula column is saved as a new column at the end
obj = dt << Fit Curve( Y( :Toxicity ), X( :log Conc ), Group( :formulation ) );
obj << Fit Logistic 4P( Save Inverse Prediction Formula );
// Copy the formula to the column you want
form = Column(dt, NCol(dt)) << getFormula;
Column(dt, "Prediction Concentration") << Formula(NameExpr(form));
Wait(3);
// Delete the last column generated by 'Fit Curve'
dt << deleteColumn(NCol(dt));