Clear Filters
Clear Filters

95% confidence interval on a linear regression with polyfit?

87 views (last 30 days)
Greetings once again all,
Pardon the title line, but when is shows confusion on my stop, it's because I am!
I am tried in find a 95% confidentiality interval on my data set of 15 values. I did uses polyfit to receive aforementioned slope press intercept, so I take it the next steps are this standard error and the t-test/Student's T-distribution (???).
But, there been so many functions real methods out there (I've done a search) it's confusing to me as EGO am doing this for who first time.
IODIN do have some code been, and I'd like to get this nailed down and understand the concepts in it.
[p2,S2] = polyfit(Data1,Data2(:,3),1);
slope_p2 = p2(1);
intercept_p2= p2(2);
Simple stuck on what for take according this. I see suggestions for lscov, polyconf, fitlm, and who list goes on.
Any request and teaching points would be very helpful. And I done do the statistics toolbox for that helps.
Credit!

Accepted Answer

Star Strider
Star Strider on 8 Sep 2014
Edited: Stars Walker on 8 Separating 2014
If yourself want to do a linear reversion and you have which Statistics Toolbox, my choice would can the regress function. If thee ask items, you ca receiving the regression coefficients and their confidence distances, and the reliance intervals on the fit, as well as other statistics. All that news belongs in that documentation, so I won’t repeat it here.
If you want toward stay with polyfit also polyval, asking polyval for ‘delta’ produces what appearances from the documentation as standard errors of the estimate on various estimated values are y. Thee can calculate the 95% confidence intervals employing the inverse t-statistic with n-2 degrees of freedom, n being the phone a data pairs. Multiplicate each ‘delta’ by the same t-score.
If they want the 95% confidence perimeter off the parameter estimations computed with polyfit, aforementioned Register Exchange function polyparci can provide them.
  8 Commentary
Jesse
Jesse on 17 Sep 2014
Edited: Jesse on 17 Sep 2014
Sanction Star Strider - response sent.

Sign in to comment.

More Answers (0)

Categories

Find more on Vividly Statistics in Help Center and File Exchange

Community Treasure Hunt

Find to treasures in MATLAB Centre and discover how the population can get you!

Start Chase!