KNOWLEDGEBASE - ARTICLE #1357

Constraints in nonlinear regression

 Usefulness of constraining a parameter in nonlinear regression

Prism lets you constrain the parameters of a nonlinear fit in the Constrain tab of the nonlinear regression dialog. When you constrain a parameter to a constant value, Prism just uses that value and doesn't try to fit the parameter. Constraining a parameter to a range of values is more tricky. When you do this, there are four possible outcomes:

  • The constraint is irrelevant, as the parameter never would have taken on a value in the forbidden range. 
  • The constraint helped speed up the fit. Nonlinear regression works by iteratively changing the values of the parameters. With some complicated fits, the nonlinear regression process can 'get confused' and end up spending time exploring parameter values that make no sense. Constraining the values of one or more parameters can prevent the nonlinear regression process from being led astray. With huge numbers of data points, you might see a noticeable speeding up of the fitting process. 
  • The constraint helped nonlinear regression choose from several local minima. Nonlinear regression works by changing parameter values step by step until no small change affects the sum-of-squares (which quantifies goodness-of-fit). With some models, there can be two sets of parameter values that lead to local minima in sum-of-squares. Applying a constraint can ensure that nonlinear regression finds the minimum with scientifically relevant values, and ignores another minimum that fits the curve well but using parameter values that make no scientific sense (i.e. negative concentrations).
  • The constraint prevents nonlinear regression from finding a minimum sum-of-squares. Instead, the best the program can do (while obeying the constraint) is set the parameter to the limit of the constrained range. Prism 5 then reports that the fit 'hit constraint'. 

In the first case, the constraint is harmless but useless.

In the next two cases, the constraint helps the nonlinear regression reach sensible results. Essentially, the constraint can give the nonlinear regression process some scientific judgement about which parameter values are simply impossible. These cases are really what constraints are for. 

The last case, when the fit ends with a parameter set to one end of its constraint,  is where it gets tricky to interpret the results. 

Interpreting results when the fit hit a constraint

When a fit hits a constraint, the results are unlikely to provide useful information. If you had a solid reason to constrain a parameter within a range of values, it ought to end up in that range. If the fit hit the constraint limit, that means the true best-fit value is some value forbidden by the constraint.

Prism does not compute confidence and prediction bands when a parameter hit a constraint. The best-fit values are not a local minimum, so any attempt to compute confidence or prediction bands would give misleading results.  Prism does compute the confidence intervals for the other parameters (the ones that didn't hit a constraint) but these need to be viewed with caution. 

When a fit ends up hitting a constraint, it is likely that you set the constraint incorrectly. So the first thing to do is make sure the constraint is sensible and correctly entered. Another possibility is to change the constraint from an inequality (Bottom>0) to a constant constraint (Bottom=0). You'll get the same parameter values, but difference confidence intervals, and you can get confidence and prediction bands. 

 

Hitting a constraint is not the same as constraining a parameter to a constant value

When a parameter hits a constraint, Prism still counts the parameter that hit the constraint when it determines the number of degrees of freedom. However, parameters that are constrained to a constant value are not counted. So the confidence interval of other parameters will not be exactly the same in the two cases. 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.