How can I create a CI after fitting a nonlinear function using LSQCURVEFIT with constraints?
25 ビュー (過去 30 日間)
古いコメントを表示
I'm fitting a custom function to two data sets and I use LSQCURVEFIT/LSQNONLIN for the fit since I need to constrain the parameter values. For this reason, I can't use NLINFIT and NLPARCI to achieve the confidence interval (as far as I understand).
Is there any possibility to calculate confidence intervals after fitting with LSQCURVEFIT? Or can I use NLINFIT and constrain the parameter values somehow?
Thanks for all help!
0 件のコメント
回答 (1 件)
John D'Errico
2020 年 8 月 19 日
Confidence intervals are more difficult when you have a constrained problem. The issue is when there are active bound or inequality constrants. The classical solution no longer truly applies, even in an asymptotic sense. The Hessian matrix at the solution point may no longer yield useful parameter variance information.
That does not mean you cannot solve the problem, only that now you need to use a different approach to compute the desired parameter variance information. That tool is either the jackknife or the bootstrap. Either should work.
Lucily (at least, if you have the Statistics & Machine Learning toolbox) it includes a function to perform a bootstrap, thus bootstrp. They left out the a, not me, :) They even provide bootci, which will compute a confidence interval.
参考
カテゴリ
Help Center および File Exchange で Least Squares についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!