If you have a perfect fit, you have zero residuals. But in the nls manual page 
we have:

Warning:

     *Do not use ‘nls’ on artificial "zero-residual" data.*

So this is a case of complaining that your diesel car is broken because you ignored the "Diesel fuel only" sign on the filler cap and put in gasoline.

However I've not been happy with this choice in the code of nls -- it's been there a long time -- and my own codes from 1974 onwards have always handled zero residual cases. I do believe that the code could at least give a better diagnostic message. Zero residuals -- perfect fits -- arise when one is interested more or less in an interpolating function rather than doing statistics, and I can understand the reluctance of statisticians to countenance such a use of nls.

And Bert's comment on overparametrization is almost certainly valid also.

JN

______________________________________________
R-help@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.

Reply via email to