The following Matlab project contains the source code and Matlab examples used for goodness of fit (modified).
GFIT2 Computes goodness of fit for regression model
[gf] = gfit2(t,y)
[gf] = gfit2(t,y,gFitMeasure)
[gf] = gfit2(t,y,gFitMeasure,options)
t: matrix or vector of target values for regression model
y: matrix or vector of output from regression model.