[R] lm: how to calculate rsquared of the predicted values?

From: Giovane <gufrgs_at_gmail.com>
Date: Sat, 8 Dec 2007 15:04:13 -0200


Hi,

I've built a linear model using multiple linear regression which leads me a R-squared value of 73.58%.

After that, I used this model to predicted some values based on the test data.
Now I'm wondering how:

  1. can I measure de R-squared value between the predicted(by the model) and real (observed) values.?
  2. Measure the RMSE error .

Example: suppose my data its below:

REAL Predicted

8.22     9.016811
28.24     9.016811
29.69    26.491108
78.02    59.234736
51.29    67.823793

37.55 18.033622
10.82 29.683154
-- 
Thanks in advance,

Giovane

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 08 Dec 2007 - 17:11:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 08 Dec 2007 - 18:30:18 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.