rsquare

calculate rsquare from data y and estimate yhat

You are now following this Submission

Simple function to calculate the r square of a dataset y (vector or matrix form) and the corresponding estimates yhat calculated using a regression.
Uses r2 = 1 - SSe/SSt
Input can contain NaNs.

Cite As

Felix Hebeler (2026). rsquare (https://www.mathworks.com/matlabcentral/fileexchange/13872-rsquare), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Better deletion of NaNs