How can i find uncertainty of coefficients ?

1 次查看(过去 30 天)
Hi all!
I have my data (x,y) and I plot these. Then I will do linear regression like:
p=polyfit(x,y,1);
yfit=polyval(p,x);
plot(x,y,'ob',x,yfit,'r');
gtext(['y=',num2str(p(1)),'x',num2str(p(2))])
I want to find the errors (or uncertainty) of coefficients a and b of the linear regression y=ax+b. How can i do this?
Thank you!

回答(1 个)

Star Strider
Star Strider 2015-11-7
Since you’re using polyfit, use my FEX submission polyparci.

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by