Dear List, how can I obtain the value of r suqared for a non-linear model? For linear models it can be found in the summary() of the model but for non-linear models I just don't know. Please help! Anna
On Mar 16, 2011, at 12:53 PM, Anna Gretschel wrote:> Dear List, > > how can I obtain the value of r suqared for a non-linear model? For > linear models it can be found in the summary() of the model but for > non-linear models I just don't know. Please help!You should do more searching. I can remember at least two threads in the last few years that discussed this issue. -- David Winsemius, MD West Hartford, CT
Dear Anna, What is your goal in obtaining a value for R^2 ? I believe it is not provided for a non-linear model, because it does not make much sense. It certainly will not have the same interpretation as in a linear model, and all the ways it *could* be "defined" come with their own sets of problems. A more precise definition of what you want (say you have a particular formula but do not know how to get the necessary information out of the model) may get a better answer. Best regards, Josh On Wed, Mar 16, 2011 at 9:53 AM, Anna Gretschel <ana-lee at web.de> wrote:> Dear List, > > how can I obtain the value of r suqared for a non-linear model? For > linear models it can be found in the summary() of the model but for > non-linear models I just don't know. Please help! > > Anna > > ______________________________________________ > 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. >-- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/
You can't. R^2 has no (consistent, sensible) meaning for nonlinear models. If you don't understand why not, get local help or do some reading. Cheers, Bert On Wed, Mar 16, 2011 at 9:53 AM, Anna Gretschel <ana-lee at web.de> wrote:> Dear List, > > how can I obtain the value of r suqared for a non-linear model? For > linear models it can be found in the summary() of the model but for > non-linear models I just don't know. Please help! > > Anna > > ______________________________________________ > 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. >-- Bert Gunter Genentech Nonclinical Biostatistics 467-7374 http://devo.gene.com/groups/devo/depts/ncb/home.shtml
Anna Gretschel
2011-Mar-16 18:33 UTC
[R] R² for non-linear model + comparing linear + non-linear models
Am 16.03.2011 19:29, schrieb Heiman, Thomas J.:> Hi Anna, > > AIC and BIC are good criteria for determining degree of model fit.. > > Sincerely, > > tom > > Thomas Heiman, PhD > Info Systems Eng, Sr > The MITRE Corporation | Center for Enterprise Modernization > Office: 703-983-2951 | theiman at mitre.org > > -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Anna Gretschel > Sent: Wednesday, March 16, 2011 2:09 PM > To: Bert Gunter > Cc: r-help at r-project.org > Subject: Re: [R] R? for non-linear model + comparing linear + non-linear models > > Dear Bert, > > so what can I do to obtain a goodness of fit for a non-linear model if > r? does not work? > > And here comes my next question: is it apropriate to comopare a linear > and a non-linear model with anova()? > > Thank you so much for answering, > Anna > > > > Am 16.03.2011 18:54, schrieb Bert Gunter: >> Is there any way that this could be made into a fortune -- perhaps by >> omitting the poster's identity? >> >> "yes there are threads concidering this topic but they are all about the >> theory not about how to get the value of r^2 for a non-linear model in R." >> >> :=) >> >> Cheers, >> Bert >> >> Anna: I say this because you have just been told that the "theory" >> tells you that you CANNOT calculate R^2 for a nonlinear model. >> >> >> On Wed, Mar 16, 2011 at 10:25 AM, Anna Gretschel<ana-lee at web.de> wrote: >>> Am 16.03.2011 18:15, schrieb David Winsemius: >>>> On Mar 16, 2011, at 12:53 PM, Anna Gretschel wrote: >>>> >>>>> Dear List, >>>>> >>>>> how can I obtain the value of r suqared for a non-linear model? For >>>>> linear models it can be found in the summary() of the model but for >>>>> non-linear models I just don't know. Please help! >>>> You should do more searching. I can remember at least two threads in the >>>> last few years that discussed this issue. >>>> >>> yes there are threads concidering this topic but they are all about the >>> theory not about how to get the value of r^2 for a non-linear model in R. >>> >>> ______________________________________________ >>> 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. >>> >> > ______________________________________________ > 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. >Thank you so much! Anna
Am 16.03.2011 19:34, schrieb Anna Gretschel:> Am 16.03.2011 19:21, schrieb Alexx Hardt: >> And to be on-topic: Anna, as far as I know anova's are only useful to >> compare a submodel (e.g. with one less regressor) to another model. >> > thanks! i don't get it either what they mean by fortune...It's an R-package (and a pdf [1]) with collected quotes from the mailing list. Be careful with the suggestion to use AIC. If you wanted to compare two models using AICs, you need the same distribution (that is, Verteilungsannahme) in both models. To my knowledge, there is no way to "compare" a gaussian model to an exponential one (except common sense), but my knowledge is very limited. [1] http://cran.r-project.org/web/packages/fortunes/vignettes/fortunes.pdf -- alexx at alexx-fett:~$ vi .emacs