[R] How to compare fit of linear and nonlinear models
spencer.graves at pdf.com
Sat Mar 18 05:01:19 CET 2006
Your first model "y~x" is a special case of "y~a*x^n", so it should
the comparison of those models should be straightforward: Does the
confidence inteval for "n" include 1?
It is not so easy to compare the second model with either the first
or the third. While model 1 is a special case of model 3, we can't get
either as a special case of model 2 nor vice versa. For ideas about how
to approach this comparison, see my earlier post on a related question
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/35450.html). If it's
sufficiently important, it should not be too dificult to Monte Carlo
various ways of possibly deciding between the models.
hope this helps.
Joerg Trojan wrote:
> Dear statistics experts,
> I'm looking for a way to compare the fit of the following three models:
> LinModel <- lm(y ~ x)
> LogModel <- nls(y ~ SSlogis(x, Asym, xmid, scal))
> PotModel <- nls(y ~ a * x^n, start=list(a=1, n=1))
> I am only interested in whether one of these models has substantial advances in
> explaining the variance of y. So my original idea was simply to compare the
> adjusted R squared values. This however seems to be problematic for nls models,
> as I learned from an earlier thread on this issue (see
> Then I thought about using AIC instead, but again this does not seem to be
> trivial (see http://article.gmane.org/gmane.comp.lang.r.general/22438).
> Do you have any suggestions on how I should proceed?
> Best regards & thanks in advance,
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
More information about the R-help