Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Nonlinearfit with bounds' topicStudent Support Forum > General > Archives > "Nonlinearfit with bounds"

Help | Reply To Topic
Author Comment/Response
Jack
05/31/04 10:37am

I'm attempting to use the nonlinearregress command to fit some data to the model 'c*Exp[-γ*x]*(1 + u*x) + d', where all the parameters need to be non-negative.

Based on the documentation, it seems that I should be using the format {symbol, start, min, max} to express my parameters, starting positions, and bounds, but the fit returns negative values for some of my parameters, appearing to ignore the limits I've set.

My input is:

NonlinearRegress[A, c*Exp[-γ*x]*(1 + u*x) + d, x, {{c, 1, 0, ∞}, {γ, 1500, 0, ∞}, {d, 1, 0, ∞}, {u, 0, 0, ∞}},
RegressionReport -> {BestFitParameters, EstimatedVariance, FitResiduals}, MaxIterations ->
1000, Weights -> Weight];


And my output (for the parameters) is
{c -> 0.75616, γ -> 961.398, d -> 1.04946, u -> -2171.97}

Any suggestions on how to enforce the bounds?

Thanks,
Jack

URL: ,
Help | Reply To Topic