Parameter estimation nlinfit vs. fitnlm

36 views (last 30 days)
Hi
I want to fit a nonlinear model using nonlinear regression function nlinfit or fitnlm.Is there a difference? which one is more robust for a difficult kinetic model?
It seems both use Levenberg-Marquardt algorithm ?
Thank You,

Accepted Answer

Star Strider
Star Strider on 26 May 2014
There is no real difference. Both nlinfit and fitnlm are Statistics Toolbox functions for nonlinear regression, and so use the same fundamental functions. The fitnlm function is a shell around nlinfit and its friends. The advantage to fitnlm is that it’s slightly easier to use, and delivers a few more statistics. The important results — parameter confidence intervals and confidence intervals on the fitted equation — are easy to get with either, but actually slightly easier with nlinfit, nlparci and nlpredci.
Experiment with both, and see which is most appropriate to your application.
Don’t neglect lsqcurvefit if you have access to it (Optimization Toolbox). It can do two things that the Statistics Toolbox functions cannot: (1) accept bounds on the parameters, and (2) fit matrix dependent variables. It doesn’t have access to all the statistics the Statistics Toolbox functions do, but it definitely has its uses.
  7 Comments
Ho Nam Ernest Yim
Ho Nam Ernest Yim on 3 Apr 2018
Edited: Ho Nam Ernest Yim on 3 Apr 2018
Hi, can I know other than lsqcurvefit (same as lsqnonlin ?) and nlinfit. Are there any other suggestions on fitting a nonlinear data ? Mainly, I would like to compare how well different methods could do. Many Thanks

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!