standard deviation of parameters in lsqcurvefit?
조회 수: 35 (최근 30일)
이전 댓글 표시
1-Is there a way to get the standard deviation or any measure of error for the optimized parameters when using lsqcurvefit?
2-can someone tell me how to get the error surface( it could one multi-dimensional depending on the number of parameters you're optimizing) in lsqcurvefit? saying it differently the amount of error in each step it is going through along with the value of parameters at that step.
I've attached a simple example of lsqcurvefit. can you show me the standard deviation on that if possible.
Thanks
댓글 수: 0
채택된 답변
Star Strider
2014년 9월 19일
댓글 수: 3
Star Strider
2014년 9월 24일
The nlparci function will provide those for you, although instead of presenting them as, for instance, 5±0.2, it will present them as [4.8 5.2]. But it will give you the information you want about them.
For lsqcurvefit, you have to request all the outputs, in this syntax:
[beta,resnorm,resid,exitflag,output,lambda,J] = lsqcurvefit(...)
and then to get the confidence intervals from nlinfit, use this syntax for it:
ci = nlparci(beta,resid,'jacobian',J)
The output ‘ci’ are the confidence intervals for each parameter in the sequence you have presented them to nlparci in the ‘beta’ vector.
Benjamin
2021년 3월 25일
Correct. So in other words,
Standard deviation = SD = (ci(2) - beta)/2
Because nlparci gives the 95% confidence interval which is (+/-)2*SD.
추가 답변 (1개)
Matt J
2014년 9월 19일
편집: Matt J
2014년 9월 19일
1. You could compute parameter covariance estimates from the output Jacobian and residuals,
[x,resnorm,residual,exitflag,output,lambda,J]= lsqcurvefit(...)
xCovariance = inv(J.'*J)*var(residual)
2. Wasn't entirely clear to me what you're asking for, but it sounds like you want to use the PlotFcns input option with @optimplotresnorm.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!