Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Level IV

Nonlinear Fit

Hello ...

I am looking for a way to fit a nonlinear function of the form

Y = c1 -  ( c1 / x ) + ( c2 / x^2 ) - ( c3 / x^3 ) + ( c4 / x^4 )

to my available dataset.

expect coefficients to be floating decimals (not integers)

I can do this in excel as part of an optimization (minimize sum of squares of residuals )  and I figure JMP should allow a similar optimization.

Appreciate any suggestions

thanks.

7 REPLIES 7
Highlighted
Community Manager

Re: Nonlinear Fit

Take a look at the Nonlinear Regression platform.

You can build out that function in the Formula Editor using Parameters that will then be estimated using the Nonlinear Regression platform.

-Jeff
Highlighted
Staff

Re: Nonlinear Fit

Is this what you're trying to do?

Run the attached script, it will make a table with this formula in it. The table has a profiler script to generate the figures below

Formula

``(((:c1 - :c1 / :x) + :c2 / :x ^ 2) - :c3 / :x ^ 3) + :c4 / :x ^ 4``
JMP Systems Engineer, Pharm and BioPharm Sciences
Highlighted
Level IV

Re: Nonlinear Fit

First my apologies for following up so late.

So the solution is not quite there yet.

I have a data set, say N entries of X and Y data.

My purpose is to derive a function that has the form/structure shown that can best fit to the provided data.

Same day, I posted this question I spent 30 mins in excel and was able to do this by putting a minimizer of sum of squares of residuals - while treating the coefficients as design variables , bounded by some limits. I like to gain this ability in jmp.

Highlighted
Community Manager

Re: Nonlinear Fit

@markbailey's response notwithstanding, can you explain why the Nonlinear platform, with a formula as @Byron_JMP showed doesn't work? From what you've described:

I have a data set, say N entries of X and Y data.

My purpose is to derive a function that has the form/structure shown that can best fit to the provided data.

Same day, I posted this question I spent 30 mins in excel and was able to do this by putting a minimizer of sum of squares of residuals - while treating the coefficients as design variables , bounded by some limits. I like to gain this ability in jmp.

That sounds like exactly what the Nonlinear platform does.

-Jeff
Highlighted
Staff

Re: Nonlinear Fit

I do not believe that a non-linear model is required in this case. You can transform x as reciprocal x and use it in the linear predictor as the quartic polynomial. Here is an example using Big Class. I want to model weight versus reciprocal height.

Learn it once, use it forever!
Highlighted
Level IV

Re: Nonlinear Fit

Mark

You have a great point w/ the transformation idea which should work (I will check it out).

But: My real purpose from the question was to uncover some hidden JMP ability (if any) to replicate something so easy that can be done in excel in 30 mins.  What if for instance, my function was nonlinear but couldn't be easily transformed by any existing form in JMP ?

A more complex example : In some recent years, there was a product called Eureqa (Cornell's AI lab) by Nutonian which now seems to be incorporated in Datarobot. Idea is a function fitter to sample data. User provides the segments believed to play a role in the function structure. An evolutionary genetic algorithm logic would then optimize according to a metric (RMSE, Fit quality etc..)

Highlighted
Super User

Re: Nonlinear Fit

That's the purpose of the nonlinear platform, as referenced by @Jeff_Perkinson

Analyze> Specialised Modeling> Nonlinear

If you look in the sample data section of the help menu you will find some data tables that illustrate modelling using the nonlinear platform.

-Dave
Article Labels

There are no labels assigned to this post.