95% confidence intervalsof regression line!

Hi! How can I calculate the 95% confidence intervals(numerically) of a regression line after using the the command regress?

 採用された回答

Star Strider
Star Strider 2017 年 11 月 1 日

0 投票

I like regress, even with its limitations. However, it would probably be best for you to re-run your regression with the fitlm (link) function, then use the predict (link) function to calculate the confidence intervals. The ‘Xnew’ in the documentation are your existing independent variable values.

4 件のコメント

Panos Ale
Panos Ale 2017 年 12 月 19 日
I know it's has been a while ,I used the fitlim and predict and everything is ok!I know it's has been a while but can you also clarify to how can I calculate the 95% CI of the slope as two numbers(upper and lower) because I want to plot them two error bars. I hope I make myself understandable. thanks for the help anyway :)
Star Strider
Star Strider 2017 年 12 月 19 日
The regress function will calculate the parameter confidence limits. You can then plot them any way you like.
As I mentioned in my original Answer, use fitlm and predict to calculate the confidence intervals on the regression line.
Panos Ale
Panos Ale 2017 年 12 月 20 日
編集済み: Panos Ale 2017 年 12 月 20 日
Clear and helpful as always!Thank you very much!
Star Strider
Star Strider 2017 年 12 月 20 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

質問済み:

2017 年 11 月 1 日

コメント済み:

2017 年 12 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by