cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Ake
Ake
Level III

Is there nonlinear fit bug in jmp 16.0?

I have a script (thanks peng_liu) that puts the parameter estimates Max and k from nonlinear fit into table variables with the same names, which I planned to use in further calculation.  It seems creating the table variables makes the nonlinear fit plot stall.

 

- the first time the script is run, the table variables Max and k are created from the parameters Max and k from nonlinear fit. If already existing they are just set to new values.

- the nonlinear fit plot is so far working as excepted, with the line of fit moving when I manually adjust the parameters Max or k in the nonlinear window

- when the script is run after the table variables have been created, the nonlinear fit plot gets stuck/static, and there is no reaction when manually adjusting the parameters Max or k

- when I remove the table variables Max and k, a new run of the script creates a functioning nonlinear fit again.

What to do?

 

3 REPLIES 3
Ake
Ake
Level III

Re: Is there nonlinear fit bug in jmp 16.0?

Update/solved?: it seems if I rename the table variables Max and k to e.g. Max2 and k2 after they have been created by the script, nonlinear fit works as expected/does not lock up, and are still being set to estimated parameter values by the script. I have no idea why.

Ake
Ake
Level III

Re: Is there nonlinear fit bug in jmp 16.0?

Update2: when I save, close and open up the data table again, the script once again creates Max and k (disregarding the renamed Max2 and k2), and the problem with the locked up nonlinear fit is back.

peng_liu
Staff

Re: Is there nonlinear fit bug in jmp 16.0?

I believe the cause is due to "scoping", a programming jargon. So in this case, I don't think it is a solution for you by saving parameter estimates as table variables using the exact same names.

By scoping, the dynamic plot that you refer to has an "evaluation environment", which has two variables with the same name "Max" and "k". To see it, right click the plot, select "Customize", then select "Current Model Fit". You will see a formula, which uses "Max" and "k". Every time, when you click the sliders to change values of "Max" and "k", the program updates those values and re-evaluate the function. However, there is another set of "Max" and "k", which is in data table's "evaluation environment", which are not updated. Unfortunately, due to evaluation precedence, the formula sees them first and use them, even the set got updated is somewhere close-by. That explains why the plot does not change.

The only thing I can think of is to use either a prefix or postfix for the table variable names, or something that is easy for you to recognize, and variable names won't collide.