File Exchange

image thumbnail

rsquare

version 1.0 (1.44 KB) by

calculate rsquare from data y and estimate yhat

1 Download

Updated

No License

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.

Comments and Ratings (7)

it works, thanks for sharing !!!

Ana Brasio

Thank you Felix Hebeler and
Petteri T for your work and suggestions.

Thanks for sharing!

Works fine!!! Thanx ;)

Petteri T

sum( (y-yhat).^2) could be replaced with (y-what)' * (y-what) for speedup as suggested there: http://www.mathworks.nl/matlabcentral/newsreader/view_thread/168821

Daithi O'hEachach

Does the job.

baldo giovane

MATLAB Release
MATLAB 7.3 (R2006b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video