# Leave-one-out cross-validation for MLR

I am doing cross-validation using the leave-one-out cross-validation method (total 10 runs). I have predicted $\hat{y}$ and observed $y$ from all the runs. I have applied the following equation to calculate $R^2$. Can anyone please confirm whether I am doing right? I am confused because the $R^2$ value appeared negative. \begin{align} SSE&=∑(y-\hat{y})^2 \\ SST&=∑(y–\bar{y})^2 \\ R^2&=1-(SSE/SST) \end{align} (N.b., $\bar{y}=$ is the average of $y$.)

• SST usually stands for total sum of squares, so it better be positive, I don't see where the square is in your formula for SST – WetlabStudent Jan 14 '14 at 2:27
• Sorry, I missed it while writing. The R2 value is negative. Would you please tell me how the result can be interpreted? Does it happen often? – user37022 Jan 14 '14 at 11:39
• I am confused because of a lack of indexing on your sums. Should y^ be y^_i? If what you are doing is some sort of nonlinear regression, what a negative value for the formula you propose for R^2 is saying here is that a flat line through the mean is effectively a better model than the one you have for y^? – WetlabStudent Jan 15 '14 at 3:13

http://en.wikipedia.org/wiki/Coefficient_of_determination

It basically suggests what I was getting at in my comment. The mean of the data is providing a better fit than your (presumably more complicated) model is. It may be time to go back to the drawing board and think about a different model. Either that or there is a bug in coding up your model.