[R] r-square for non-linear regression

Antonio Olinto aolinto at bignet.com.br
Tue Jul 16 14:29:39 CEST 2002


Dear Menne,

Three months ago I wrote to R list asking about the coefficient of
determination on a nls regression and I got the answers below. Well, I
haven't a citation to give you but I hope these e-mails can contribute to
the discussion.

Best wishes,

Antonio Olinto

----- Original Message -----
From: <apjaworski at mmm.com>
Sent: Wednesday, May 01, 2002 3:52 PM
Subject: Re: [R] coefficient of determination on a nls regression

Antonio,

For linear regression we have the following identity

     total SS = regression SS + residual SS        (*)

where total SS is the sum of squares of observations around their mean,
i.e.

     total SS = (n-1)*var(y)

and residual SS is given by the deviance function.

R-squared is defined as

     R^2 = regression SS/ total SS = 1 - residual SS/total SS.

You can use this last formula to define a similar quantity for nonlinear
regression.  You have to remember that R^2 does not have its usual meaning
for NLS.  In fact, the basic identity (*) does not hold and the residuals
do not add up to zero.

Hope this helps,

Andy


----- Original Message -----
From: "Douglas Bates" <bates at stat.wisc.edu>
Sent: Wednesday, May 01, 2002 2:40 PM
Subject: Re: [R] coefficient of determination on a nls regression

There is a good reason that an nls model fit in R does not provide
r-squared - r-squared doesn't make sense for a general nls model.

One way of thinking of r-squared is as a comparison of the residual
sum of squares for the fitted model to the residual sum of squares for
a trivial model that consists of a constant only.  You cannot
guarantee that this is a comparison of nested models when dealing with
an nls model.  If the models aren't nested this comparison is not
terribly meaningful.

 So the answer is that you probably don't want to do this in the first
place.


----- Original Message -----
From: "Dieter Menne" <dieter.menne at menne-biomed.de>
To: "R-Help" <r-help at stat.math.ethz.ch>
Sent: Tuesday, July 16, 2002 5:45 AM
Subject: [R] r-square for non-linear regression


> We have extracted parameters from physiological measurements by fitting
> SSlogis-like curves with nlsList and nlme.
>
> We presented residuals plot in a paper, but a referee argues that these
> cannot be included (too technical), and r-square values should be given
> instead to compare the goodness of fit with those of other authors.
>
> I remember that 30 years ago in my stat 101, I learned that r-square is
> nonsense for non-linear fits, but I cannot find a referee-proof citation
for
> this. Probably SAS does it (I know what Bill Venables will say about this
> argument...).
>
> Can anybody provide me a citation on r-square for/against non-linear fits,
> or tell me that I am wrong?
>
> Dieter
>
>
> ---------------------------------------
> Dr. Dieter Menne
> Biomed Software
> 72074 Tübingen
> Tel (49) (7071) 52176
> FAX (49) (7071) 55 10 46
> dieter.menne at menne-biomed.de
> www.menne-biomed.de
>
>
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> r-help mailing list -- Read
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list