[R] non linear modelling with nls: starting values

From: Sebastian P. Luque <spluque_at_gmail.com>
Date: Mon 18 Sep 2006 - 14:59:50 GMT


Hi,

I'm trying to fit the following model to data using 'nls':

y = alpha_1 * beta_1 * exp(-beta_1 * x) +

    alpha_2 * beta_2 * exp(-beta_2 * x)

and the call I've been using is:

nls(y ~ alpha_1 * beta_1 * exp(-beta_1 * x) +

        alpha_2 * beta_2 * exp(-beta_2 * x),     start=list(alpha_1=4, alpha_2=2, beta_1=3.5, beta_2=2.5),     trace=TRUE, control=nls.control(maxiter = 200))

So the model has 4 parameters (alpha_1, alpha_2, beta_1, beta_2), but providing appropriate starting values is proving difficult. Although the data could reasonably be fit with this model, the procedure is exiting with "singular gradient matrix at initial parameter estimates". How can one obtain appropriate starting values, assuming that is really the problem? The archives show some suggestions to use 'optim', but that requires starting values too, so I'm not sure how to proceed.

Searching for self-starting functions, I found that there's one for a bi-exponential model, which is very similar to the one I'm trying to fit. Would it be reasonable to create a modified version of this function, so that it returns a value that can be used for the model above? I would greatly appreciate any comments and suggestions.

-- 
Seb

______________________________________________
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 Sep 19 01:04:06 2006

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 Mon 18 Sep 2006 - 16:30:15 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.