フィルターのクリア

What formula for r-squared does fitlm use in the weighted linear regression case?

17 ビュー (過去 30 日間)
Paul Safier
Paul Safier 2024 年 2 月 7 日
編集済み: Matt J 2024 年 2 月 7 日
If I use fitlm as:
mdl = fitlm(X,Y,'Weights',W);
can someone tell me the formula used in computing the r-squared that's here:
mdl.Rsquared.Ordinary
I am seeing a different result when compared to JMP. Thanks.

回答 (1 件)

Matt J
Matt J 2024 年 2 月 7 日
  2 件のコメント
Paul Safier
Paul Safier 2024 年 2 月 7 日
編集済み: Paul Safier 2024 年 2 月 7 日
Thanks @Matt J. It says Rsq = 1 - SSE/SST. Not seeing where the equation for SSE or SST is given in the weighted LS case. It ought to be different for OLS vs WLS. I'm interested in what MATHWORKS uses specifically for WLS.
Matt J
Matt J 2024 年 2 月 7 日
編集済み: Matt J 2024 年 2 月 7 日
I don't believe weights are taken into account in the computation of R2. This should be easy to verify, by comparing the stack exchange formulas (both weighted and unweighted) to what Matlab gves you.

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

カテゴリ

Help Center および File ExchangeSupport Vector Machine Regression についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by