How do I find the errors for fitting parameters in lsqnonlin
显示 更早的评论
How do I get fitting parameters along with their errors when using lsqnonlin for my fittings? What I mean is that I want parameters' errors after fitting.
Thanks in advance
回答(1 个)
Star Strider
2012-8-3
编辑:Star Strider
2012-8-3
0 个投票
If you have the Statistics Toolbox, see ‘nlparci’. If you don't, then I refer you to http://www.bsos.umd.edu/socy/alan/stats/socy602_handouts/kut86916_ch13.pdf, specifically to Equations 13.31 and 13.32. Those allow you to calculate the variance-covariance matrix for the parameters. From those you can calculate the standard errors, and from there the conficence intervals. The ‘D’ matrix in Equation 13.32b is the Jacobian. You want to end up with a square matrix of size [P x P] where P is the number of your parameters, so you may have to experiment a bit.
类别
在 帮助中心 和 File Exchange 中查找有关 Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!