[R] "F-value" and "P-value" for nonlinear regression ...

Douglas Bates bates at stat.wisc.edu
Thu Sep 25 01:38:28 CEST 2008


On Wed, Sep 24, 2008 at 2:54 PM, getulio coutinho figueiredo
<uspgetuliocf at gmail.com> wrote:
> Hello, everyone!

> I would like to know how to calculate the F-value and P-value for a
> non-linear regression: y ~ a * X^b * W^c ?

> Note: a, b and c are coefficients of adjustment of the equation and X and W
> are variables previously measured ...

> Someone would have any suggestions?

This answer may sound pedantic but it is a result of my having spent a
considerable part of my life thinking about nonlinear regression
models.   You are assuming that it is meaningful to associate an
F-value and a p-value with a nonlinear regression model and it is not
quite that easy.

 A regression model does not automatically generate an F-value and
p-value.  Those come from a hypothesis test with a null hypothesis and
an alternative hypothesis.  The alternative hypothesis is that the
data were generated according to the model being fit with some unknown
values of the parameters.  Unfortunately, it is not clear what the
null hypothesis should be.  For an F statistic to be meaningful the
null hypothesis model must be nested within the alternative hypothesis
model.  In linear regression this means either a model with constant
predictions, if the fitted model has a constant term, or a model all
of whose predictions are zero, otherwise.  One can tell from the model
that was fit which one is appropriate.

In nonlinear regression it is not easy to decide what the appropriate
null hypothesis should be, which is why anova returns

anova is only defined for sequences of "nls" objects

This means that you must be explicit about the test that you wish to
perform by providing fitted models representing both the null
hypothesis and the alternative hypothesis.

when passed a single nls object.



More information about the R-help mailing list