[R] lm: how to calculate rsquared of the predicted values?
Max Kuhn
mxkuhn at gmail.com
Sat Dec 8 18:38:01 CET 2007
>
> 1. can I measure de R-squared value between the predicted(by the model) and
> real (observed) values.?
> 2. Measure the RMSE error .
>
There is a function in the caret package called postResample that will
do that (even if you aren't using resampling).
As has been previously noted on this list, there are a number of
formulas for R-squared. This function uses the square of the
correlation between the observed and predicted. The next version of
caret will offer a choice of formulas.
--
Max
More information about the R-help
mailing list