How does mdl.Rsquared.Ordinary and mddl.Rsquared.Adjusted work?

6 ビュー (過去 30 日間)
Juniper Sohn
Juniper Sohn 2019 年 7 月 5 日
編集済み: the cyclist 2019 年 7 月 5 日
Hi all,
How does Rsquared.Ordinary and Rsquared.Adjusted work? Does it use the raw values of the data set, or use the z-scores of the data set?
I am running a single variable linear regression using fitlm, and trying to get the r2 value by using Rsquared.Ordinary and Rsquared.Adjusted.
I want to know whether I have to standardize my data by turning them into z-scores, AND THEN use Rsquared.Ordinary (of course, I won't need to standardize my data if the Rsquared function already calculates the z-scores)
Thank you!

採用された回答

the cyclist
the cyclist 2019 年 7 月 5 日
編集済み: the cyclist 2019 年 7 月 5 日
R-squared and adjusted R-squared are invariant to scaling and mean-centering of the input data. So, you don't need to do it. But even if you do, you will get the same result.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by