I would like to produce the R^square goodness-of-fit statistics for a predictive model.

I have the base data (10, 000 number of x-values) which are the true values given by an analytic/deterministic function x = function(a, b, c....). I have the prediction data (10,000 number of y-values) which are the prediction values from an engine.

Hence, the fitted equation should be y = 1 * x (as the prediction should be the deterministic output, all things being equal).

How would I be able to calculate the r^square of y relative to x, assuming a forced fitted line of y = 1 * x?

I believe the r^square standard formulae = 1 - SS_res/SS_tot; where SS_res = summation(difference between y and x)^2, and SS_tot = summation(y - x_mean?)^2.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.