[R] nonlinear regression: nls, gnls, gnm, other?

From: Johann Hibschman <johannh_at_gmail.com>
Date: Tue 16 Jan 2007 - 04:04:32 GMT


Hi all,

I'm trying to fit a nonlinear (logistic-like) regression, and I'd like to get some recommendations for which package to use.

The expression I want to fit is something like:

y ~ A * exp(X * Beta1) / (1 + exp(-(x + X * Beta2 - xmid)/scal))

Basically, it's a logistic function, but I want to be able to modify the saturation amplitude by a few parameters (Beta1) and shift the inflection point around with a few other parameters (Beta2). I have a ton of data, but I often have trouble getting the routine to fit.
(I've been using nlin in SAS, which seems sloppier in terms of
accepted convergence.)

Now, from what I can tell, I can use nls, gnls, or gnm to fit something like this, but I can't tell which would be better, or if there's something else I should be trying. To do this right, though, I have to do a lot more reading, but I'd like to know where to start.

(I have more of a physics/computer background, so I immediately jump
to thinking of regression as minimizing some cost function across a multidimensional space and then start mumbling about simulated annealing or some such, but this isn't helping me much in interpreting the available literature.)

So, does anyone have any suggestions? I imagine I'm going to have to pick up a book, but should it be Pinheiro & Bates on nlme, Bates & Watts, the pdf manual to gnm, or what?

Thanks for any suggestions,

Johann



R-help@stat.math.ethz.ch 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 Tue Jan 16 15:10:48 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 16 Jan 2007 - 10:30:29 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.