From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>

Date: Mon 18 Sep 2006 - 15:55:24 GMT

Date: Mon 18 Sep 2006 - 15:55:24 GMT

"Gabor Grothendieck" <ggrothendieck@gmail.com> writes:

> Here are some approaches:

*>
**> - we only have 4 parameters so just use grid search to get
**> starting values as in:
**>
**> https://stat.ethz.ch/pipermail/r-help/2005-September/079617.html
**>
**> - there are singularities near beta_1 = beta_2 and near alpha_1 = 0
**> and near alpha_2 = 0 so reparameterize and use the upper and
**> lower bounds to avoid those regions. You could try a separate
**> reduced model for those.
*

Or just use SSbiexp and reparametrize (it is exactly the same model)

*>
*

> On 9/18/06, Sebastian P. Luque <spluque@gmail.com> wrote:

*> > 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.
**> >
**>
**> ______________________________________________
**> 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.
**>
*

-- O__ ---- Peter Dalgaard ุster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 ______________________________________________ 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:59:09 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 Tue 19 Sep 2006 - 04:30:05 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.
*