How can I obtain error in parameters estimated in optimization toolboox (lsqcurvefit) ?

22 views (last 30 days)
I am trying to obtain the value of a parameter by fitting a model equation by lsqcurvefit solver. I give the option show diagnostics and it shows the first order optimality and other values after running the solver. However, as with any optimization problem, I am getting a range of values satisfying the condition. Is there any option through which I can get the standard deviation and mean in the value of the parameter estimated?

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 13 Jan 2013
It appears that you are looking for confidence intervals to evaluate how good your fit is. Unfortunately LSQCURVEFIT or other functions in the Optimization Toolbox don't have support for fit statistics. However, if you do have Statistics Toolbox you can use the NLINFIT to perform the same fit by rephrasing your model such that you provide the objective function instead of the curve. Here is an example that demonstrate this. http://www.mathworks.com/help/stats/nlinfit.html#btk7kzf-2
Once you have the fit you can use nlparci for the regression parameter confidence intervals for your confidence level: http://www.mathworks.com/help/stats/nlparci.html
hth

More Answers (1)

Ketki Sharma
Ketki Sharma on 7 Feb 2013
Thanks. I will try this approach.

Community Treasure Hunt

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

Start Hunting!