Using the fitlm function for model without intercept, how R-squared is being calculated?

10 ビュー (過去 30 日間)
Farhad Balali
Farhad Balali 2018 年 7 月 17 日
コメント済み: Shuqi Liu 2021 年 7 月 19 日
The value of the R-squared when I define the linear model without intercept are mostly negative and somehow close to -3. When I apply the fitlm function for model without intercept, the R-squared values are between 0 and 1. Does anyone know which formula Matlab is using in this case?
  1 件のコメント
Shuqi Liu
Shuqi Liu 2021 年 7 月 19 日
Also when using fitlm without intercept, the Rsquared comptued by fitlm is different using Matlab 2020a and prior vs 2020b. Does anyone knows why did it change?

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

回答 (1 件)

Rishabh Gupta
Rishabh Gupta 2018 年 7 月 27 日
Hi Farhad,
There are 2 types of R-squared values -
  1. Ordinary R-Squared
  2. Adjusted R-Squared
You can have a look at the formula in the below Link:
Regards
  1 件のコメント
Pulkit Goyal
Pulkit Goyal 2020 年 4 月 8 日
This page doesn't explain the R-squared definitions when intercept is forced to zero.

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by