No BSD License
06 Feb 2007
06 Feb 2007)
calculate rsquare from data y and estimate yhat
Watch this File
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.
it works, thanks for sharing !!!
Thank you Felix Hebeler and
Petteri T for your work and suggestions.
Thanks for sharing!
Works fine!!! Thanx ;)
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
Does the job.