turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- How to put a restraint on a parameter during optimiztion.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 13, 2012 11:39 AM
(2879 views)

Hello all,

Recently, I noticed that every once in a while, a parameter that I have been solving for using non-linear least squares has been coming up as negative. Unfortunately, it is theoretically impossible for the parameter to be negative. How can I add a restraint to the script so that it cannot be negative?

Thank you,

--SurfaceThought

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 14, 2012 8:43 AM
(4921 views)

JMP Nonlinear allows you to specify upper and lower bounds for each parameter.

Example:

Nonlinear(

Y( :y ),

X( :Formula ),

Parameter Bounds( b0( 10, 20 ), b1( 3, 5 ) ),

Newton,

Finish

);

This is available when you supply a custom formula. You can accomplish the same thing interactively by using the red triangle pull down menu for "Nonlinear Model" on the "Control Panel" dialog box. The first item is "Parameter Bounds". (In fact that's how I generated the script above ... I did the interactive thing and then saved script to script window). I don't see a way to do this using the simplified "Curve Fit" personality.

3 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 14, 2012 2:32 AM
(2754 views)

Hi - if the parameter in question is p, and you're fitting a nonlinear model, you could reparametrise the model so that you replace the original p by some function f(p) = abs(p), exp(p), p^2 or any other function that can only take non-negative values. What ought to happen then is that the model will be optimized at f(p) = 0, with all the other parameters being adjusted accordingly. I'd probably use f(p) = p^2 in preference to exp(p), just to prevent the optimization routine wasting a lot of time trying to push exp(p) to zero by sending p off to minus infinity, and using abs(p) would cause problems if the optimization routine depends on the function being differentiable at all values of p. Does that help at all?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 14, 2012 8:43 AM
(4922 views)

JMP Nonlinear allows you to specify upper and lower bounds for each parameter.

Example:

Nonlinear(

Y( :y ),

X( :Formula ),

Parameter Bounds( b0( 10, 20 ), b1( 3, 5 ) ),

Newton,

Finish

);

This is available when you supply a custom formula. You can accomplish the same thing interactively by using the red triangle pull down menu for "Nonlinear Model" on the "Control Panel" dialog box. The first item is "Parameter Bounds". (In fact that's how I generated the script above ... I did the interactive thing and then saved script to script window). I don't see a way to do this using the simplified "Curve Fit" personality.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 30, 2012 9:37 AM
(2754 views)

mpb -

This was exactly what I was looking for! Just noticed I never marked it as the correct answer. Thanks!