01-14-2010 07:02 AM
Hi,
I found an issue with the Advanced Analysis Library function GoodnessOfFit, which I use to calculate R^2.
For a given data set it returns SSE = NaN, R^2 = NaN, and RMSE = NaN, while the return status is NoAnalError.
I can not see any mathematical sitation which might yield NaN for SSE, the summation of square error....
Moreover, if problems arise with the involved calculations, I would expect the function to return an error condition.
Hence I suppose it might be a bug...
The occurence of this 'situation' depends on the data set.
Wolfgang
01-19-2010 09:40 AM
Hi Wolfgang,
could you post an example so I can see what input values you are using?
Regards,
02-26-2010 11:33 AM
Hi Andreas,
thanks to the assistance of Luis who pointed out how to save variable values to a file I can now provide one data set showing 'unexpected' behavior.
This is not the original problem as outlined above but it could be related.
OK, after fitting a data set I am calling
GoodnessOfFit ( y_selected, y_fit_1, weights, fit_points, ( fit_points - coefficients_1 ), &sse, &r_square, &rmse );
and receive a r_square value that is negative... For me this is unexpected if I believe in the name square....
The return status is 'No Analysis Error' (0).
I am attaching the data that shows this result, with fit_points = 24064, coefficients_1 = 3 and the result r_square = -8.719...e-1
Wolfgang