Skriptfrage: Das Speichern der inversen Vorhersageformel in eine bereits vorhandene Spalte erzwingenHallo zusammen,
Ich möchte das Speichern einer „Fit Curve“-Ausgabe eines linearen Modells namens „inverse Vorhersageformel speichern“ in eine definierte und bereits vorhandene Spalte (zB „vorhergesagte Konzentration“) erzwingen. Ist das durch Skripting möglich? Der Grund dafür ist, dass regelmäßig neue Daten eingehen, ein Skript gestartet werden sollte, um eine aktualisierte inverse Vorhersageformel zu berechnen und zu speichern und die vorhandene im Datensatz zu überschreiben. Ich habe dieses Beispiel in der Skriptbibliothek gefunden, aber ich tue es wissen nicht, wie eine vorhandene inverse Vorhersageformel in den Daten überschrieben wird.
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 />
Danke schön,
Liebe Grüße, Valérie
Betreff: Skriptfrage: Das Speichern der inversen Vorhersageformel in eine bereits vorhandene Spalte erzwingenHier ist eine Möglichkeit:
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));