Finding standard errors in curve fitting tool
23 ビュー (過去 30 日間)
古いコメントを表示
i have some data. I fit it through linear custom equation y=m*x+c. MATLAB returns m and c. with following documentation.
General model:
f(x) = m*x+c
Coefficients (with 95% confidence bounds):
c = 12.37 (8.287, 16.45)
m = 5.811 (5.45, 6.172)
Goodness of fit:
SSE: 424.3
R-square: 0.9758
Adjusted R-square: 0.9749
RMSE: 3.964
But i want to find standard error of m and c, like 12.37+-something and 5.811+-something. Kindly help me how to find these standard errors while fitting which is not provided by MATLAB.
While fitting it through origin, it shows the value 12.36805 ± 1.98883 and 5.81078 ± 0.17596 respectively. Can anyone help me how to find this in MATLAB? In real research data we resresent the coefficients obtained like this. Please help. Please find the data in attached file
0 件のコメント
回答 (2 件)
John D'Errico
2019 年 8 月 7 日
編集済み: John D'Errico
2019 年 8 月 7 日
In real research, maybe YOU always show it that way. That is not true for everybody. Standard for you is not necessarily standard for the entire world.
Anyway, it is simple enough though, even trivial. The bounds will always be symmetric around the estimate. So just subtract the estimate from the upper bound. That gives you the delta you want to see.
For c, for example,
16.45 - 12.37 = 4.08
So the estimate of c, as you want to write it, is 12.37 +/- 4.08.
You can easily enough extract those values from the curve fitting object as returned.
0 件のコメント
Marvin Marco Jansen
2020 年 7 月 21 日
Hi John,
it think that the 95% confidence bound should mean that the given values are the +/- 2-sigma intervall. This would mean that the origin and matlab fits give use basically the same sigma for m and c.
Kind regards,
Marvin
2 件のコメント
Adam Danz
2020 年 7 月 21 日
編集済み: Adam Danz
2020 年 7 月 22 日
The 95% CI defines the bounds of the middle 95% of the data where there is 2.5% of the distribution on the right and 2.5% of the distribution on the left outside of the interval. Those cutoff points coincide with the +/- 1.96 sigma values only when the distribution is normal.
Marvin Marco Jansen
2020 年 7 月 22 日
Yes, of course only when the distribution is normal. Thanks fr the quick answer Adam
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!