Finding the Confidence Interval of Slope

19 views (last 30 days)
Daniel
Daniel on 23 Jul 2014
Answered: Star Strider on 23 Jul 2014
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!

Answers (1)

Star Strider
Star Strider on 23 Jul 2014
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!