First thank you for the codes. I checked and compared the outputs of RSS (residual sum of squares), MSS (model sum of squares) and R-squared. There may be something wrong. The formula seems to be R-sq = rss / (rss+mss) . I think either the R-sq formula is wrong, or the names assigned to rss and mss have been mixed up. Thank you very much!
First thank you for the codes. I checked and compared the outputs of RSS (residual sum of squares), MSS (model sum of squares) and R-squared. There may be something wrong. The formula seems to be R-sq = rss / (rss+mss) . I think either the R-sq formula is wrong, or the names assigned to rss and mss have been mixed up. Thank you very much!