[Date Index] [Thread Index] [Author Index]
Re: Mathematica calculates RSquared wrongly?
On 9/30/2010 3:52 AM, Lawrence Teo wrote: > With reference to the following statement, > >> This is as designed. For nonlinear models, the corrected (i.e. with the >> mean subtracted out) sum of squares is sometimes used. This is >> consistent with comparing to a constant model, but most nonlinear models >> do not include a constant in an additive way. For this reason, >> NonlinearModelFit uses the uncorrected (i.e. without subtracting out the >> mean) sum of squares. > Is this the standard practice in mathematics world? > It seems to me that this takes away the common comparison ground > between linear and nonlinear regression. > > I always get unrealistically high R^2 (>0.9) from NonlinearModelFit > function, even though the fit might be awfully off. > This makes me think if the so called uncorrected R^2 is right. > > Any explanation? Thanks > > PC > I have seen both definitions (based on corrected and based on uncorrected) used, but in both cases the comparison and interpretation breaks down because of the nonorthogonality Ray mentioned. Authors often caution that R^2 is not particularly meaningful for nonlinear model. As a general rule, I would advice against using R^2 for nonlinear models because the interpretation is at the very least not as clear as it is in linear models. Also, if the model is actually a linear model, I would advice fitting it as a linear model to take advantage of the properties and results available for linear models which may not be applicable to nonlinear models in general. Darren Glosemeyer Wolfram Research