Finding the Confidence Interval of Slope

8 次查看(过去 30 天)
I currently have a set of data points. I am plotting a linear regression line through this data. Now I want to find the confidence interval of the slope for this data.
I am currently using the regress function which works great. My only concern is that I read somewhere that the regress function uses an f-test to obtain the confidence interval. Is this true?
I am looking for a function that will get my data points and give me a confidence interval of the slope, using a t-test.
Please let me know if the regress function is fine or if there is something better.
Thanks!

回答(1 个)

Star Strider
Star Strider 2014-7-23
The regress function is fine. From the documentation on Interpret Linear Regression Results, the t-statistic is used to determine the confidence intervals of the parameters. See the section under ‘Display coefficient confidence intervals’ for details on how to get those. The p-value is for the F-statistic.

Community Treasure Hunt

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

Start Hunting!

Translated by