Get 95% Confidence Values from Fit Coefficients

21 ビュー (過去 30 日間)
Scott
Scott 2011 年 12 月 19 日
Hey, I've run a curve fit and have various coefficient outputs. For example:
A = 13.34 (12.37, 14.31)
B = 9.955 (6.182, 13.73)
Any idea how I can save a vector such as:
dA=(12.37, 14.31) and dB=(6.182, 13.73)? Everything is run via my .m file so I don't want to do this by any mouse-commands in a GUI but rather via a command within the .m file. Thanks.

採用された回答

Sean de Wolski
Sean de Wolski 2011 年 12 月 19 日
per comments:
doc confint
will explain how to extract the confidence interval parameters from a fit object.
  3 件のコメント
Sean de Wolski
Sean de Wolski 2011 年 12 月 19 日
Did you run the curve fit in the curve fit tool (cftool) of the curve fitting toolbox?
Scott
Scott 2011 年 12 月 19 日
I ran it via a command in the .m file since the fit is contained within a loop:
f = fittype(...)
[c2,gof2] = fit(xdata,ydata,f,...)

サインインしてコメントする。

その他の回答 (1 件)

Scott
Scott 2011 年 12 月 19 日
Sean's help worked! [c2,gof2] = fit(xdata,ydata...etc) ci = confint(c2) Gives the variable ci a vector of all the uncertainties. I can then save dA(1,1)=ci(1,1) and dA(1,2)=ci(1,2) etc.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by