I am writing a program for automated (i.e. no user intervention - for biologists) iteratively reweighted least-square fit to a function of the form "reading ~ exp(lm2)/(1 + (dose/exp(lm3))^exp(lm4)" using case weight proportional to the mean, e.g., E(reading). Because for some datasets the solution is sensitive to starting values, I first use OPTIM() with Nelder-Mead to locate the solution, and then plug the solution into NLS() (default algorithm) using the appropriate weights as a way to retrieve SEs, deviance, etc rather than computing these from OPTIM results.
An example is below, with an abridged OPTIM output followed by NLS output:
[***NOTE - the correct solution parameters values are the line above on the absolute scale, which are the values below on the ln scale, representing the first evaluation by NLS. This gives the correct objective function value of 0.763370, and hence agrees with OPTIM at this point ***]
Can anyone suggest what I might be doing wrong, or is this a bug or anomaly of the NLS algorithm?
Thanks in advance
Richard Sposto (Los Angeles).
-- This message was sent on behalf of rsposto_at_yahoo.com at openSubscriber.com http://www.opensubscriber.com/message/r-help@stat.math.ethz.ch/7530379.html ______________________________________________ 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.Received on Sat 22 Dec 2007 - 00:41:59 GMT
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.2.0, at Sat 22 Dec 2007 - 03:30:20 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.