fitting a linear model without an intercept term

64 ビュー (過去 30 日間)
cgo
cgo 2018 年 9 月 5 日
編集済み: Stephan 2018 年 9 月 5 日
I wanted to use the fitlm (linear regression function) but without the intercept term in the output. I wonder if there is a way to do this?
(I am aware of the mldivide as in the case of: Y = XB; B = X\Y), but I wanted to see the p-values as outputted by the fitlm function, hence my preference for this function.

採用された回答

Stephan
Stephan 2018 年 9 月 5 日
編集済み: Stephan 2018 年 9 月 5 日
Hi,
you can do this with fitlm by setting the intercept option to false. The corresponding documentation section is linked above.
Best regards
Stephan

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRegression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by