Subscribe Bookmark RSS Feed

Copy column prediction formulas to new column

Treponema

Occasional Contributor

Joined:

Nov 3, 2016

Hi community,

 

This is probably an easy fix, but I'm stumped... I am looking for a scripting answer.

 

I am trying to make a generic workflow in a JSL add-on consisting of the following steps:

1: Create new column with non-linear prediction expression and parameters (done)

2: Model non-linear data with prediction expression and fit by groups (done)

3: Save prediction formula by groups in a new column (done)

4: Copy prediction formulas (from 3.) into a new column and differentiate by column(X) (help!)

 

Basically, I am trying to copy a prediction formula from one column into another column in the same data table for differentiation and subsequent visualization (graph builder).

 

Thanks alot :)

1 ACCEPTED SOLUTION

Accepted Solutions
markbailey

Staff

Joined:

Jun 23, 2011

Solution

This approach should work:

  • You know the model so you can differentiate outside of JMP.
  • You can use the Get Formula message to get the expression for the saved prediction formula.
  • You can use the Arg() function to extract all the parameter estimates.
  • You can use Substitute() to replace placeholders with the actual estimates in the derivative.
  • Use the Set Formula() message with the new expression to set the new column.
Learn it once, use it forever!
2 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

Solution

This approach should work:

  • You know the model so you can differentiate outside of JMP.
  • You can use the Get Formula message to get the expression for the saved prediction formula.
  • You can use the Arg() function to extract all the parameter estimates.
  • You can use Substitute() to replace placeholders with the actual estimates in the derivative.
  • Use the Set Formula() message with the new expression to set the new column.
Learn it once, use it forever!
Treponema

Occasional Contributor

Joined:

Nov 3, 2016

Thanks alot Mark!