cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Ake
Ake
Level III

How to get nonlinear fit parameters back to data table

Hi,

I have used the nonlinear platform interactively to fit and estimate the parameters Max and k in a formula column as below. I would like to get the estimates back to the data table to use in other formula columns. I have searched, but not been able to figure out how to access them outside the column where the formula resides. I tried Save estimates to table, which gets them into a new separate table. Using jmp 16.0

 

Nonlinear.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
peng_liu
Staff

Re: How to get nonlinear fit parameters back to data table

//add steps here to get Nonlinear Estimates table from Nonlinear platform.
name =  data table("nonlinear estimates"):parameter << get values;
value = data table("nonlinear estimates"):estimate << get values;
for (i=1,i<=length(name),i++,
	data table("original table") << Set Table Variable( name[i], value[i] )
)

Maybe try "Set Table Variable". Seems it is the same as "add" if the variable does not exist. I was thinking of "delete" before "add", but that may break dependencies if you build other things that depend on the variables.

View solution in original post

Ake
Ake
Level III

Re: How to get nonlinear fit parameters back to data table

This also worked perfectly! I might come back to expand the script to do the parts I did manually!

View solution in original post

4 REPLIES 4
peng_liu
Staff

Re: How to get nonlinear fit parameters back to data table

Here is an example to add them as table variables.

//add steps here to get Nonlinear Estimates table from Nonlinear platform.
name =  data table("nonlinear estimates"):parameter << get values;
value = data table("nonlinear estimates"):estimate << get values;
for (i=1,i<=length(name),i++,
	data table("original table") << New Table Variable( name[i], value[i] )
)
Ake
Ake
Level III

Re: How to get nonlinear fit parameters back to data table

Thank you so much for the super fast response! This works! Could you also suggest how to load the parameter values into already existing table variables (Max and k in this case), so I don't get new ones every time?

Best, Åke

peng_liu
Staff

Re: How to get nonlinear fit parameters back to data table

//add steps here to get Nonlinear Estimates table from Nonlinear platform.
name =  data table("nonlinear estimates"):parameter << get values;
value = data table("nonlinear estimates"):estimate << get values;
for (i=1,i<=length(name),i++,
	data table("original table") << Set Table Variable( name[i], value[i] )
)

Maybe try "Set Table Variable". Seems it is the same as "add" if the variable does not exist. I was thinking of "delete" before "add", but that may break dependencies if you build other things that depend on the variables.

Ake
Ake
Level III

Re: How to get nonlinear fit parameters back to data table

This also worked perfectly! I might come back to expand the script to do the parts I did manually!