RSquared
Description
This generic function calculates the squared multiple correlation, or 'proportion variance explained', according to the formula
R^2 = 1  SS(obj)/SS(tot)
, where SS(obj) = sum (y  pred(y))^2 is the squared error of predictions pred(y), and SS(tot) = sum (y  mean(y))^2 the total sum of squares.
Usage
1 
Arguments
object 
An object of a suitable class for the RSquared to be
calculated  an object with a predict method, and if y is missing, a slot

... 
Some methods for this generic function accept an argument y, providing the observed data. At present, no other additional arguments are used 
Value
Returns a numeric value with the corresponding RSquared.
Author(s)
Maarten Speekenbrink